The steps are the same whether you’re using a domain name root or a subdomain; we’ll show both for clarity.
Add DNS records
We use two DNS records for mastodon.site servers; one to point to the actual server, and the other for the media assets - photos, videos, etc - that users upload to their account. You’ll need to add both to your domain name in Cloudflare.- From the Cloudflare dashboard, choose the domain for your mastodon server
- From the menu on the left, go to
DNS
->Records
- Click the
Add record
button; you’ll need to add the following two records
Domain root
If you’re using a domain root (for example,https://mastodon.site
)
Type | Name (required) | Target (required) | Proxy status | TTL |
---|---|---|---|---|
CNAME | @ | cname.mastodon.site | Flip to off (DNS only) | Auto |
CNAME | mastodon-assets | cname.mastodon.site | Keep proxy enabled | Auto |
Subdomain
If you’re using a subdomain (for example,https://social.mastodon.site
) - replace the word social
in the name of each record with the subdomain you’re using
Type | Name (required) | Target (required) | Proxy status | TTL |
---|---|---|---|---|
CNAME | social | cname.mastodon.site | Flip to off (DNS only) | Auto |
CNAME | mastodon-assets.social | cname.mastodon.site | Keep proxy enabled | Auto |