This page will show you how to configure your domain name on Cloudflare to work with mastodon.site.

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.

  1. From the Cloudflare dashboard, choose the domain for your mastodon server
  2. From the menu on the left, go to DNS -> Records
  3. 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)

TypeName (required)Target (required)Proxy statusTTL
CNAME@cname.mastodon.siteFlip to off (DNS only)Auto
CNAMEmastodon-assetscname.mastodon.siteKeep proxy enabledAuto

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

TypeName (required)Target (required)Proxy statusTTL
CNAMEsocialcname.mastodon.siteFlip to off (DNS only)Auto
CNAMEmastodon-assets.socialcname.mastodon.siteKeep proxy enabledAuto

Testing the DNS records

Once they’re both set, it can take a short while for them to be available across the internet. You can use WhatsMyDNS.net to test that it’s working - you’ll see a green tick next to a list of IP addresses once it’s ready.