Home
/
Website Help
/
Cloudflare
/
How to enable Cloudflare for a subdomain?

How to enable Cloudflare for a subdomain?

Cloudflare services are enabled for a given domain name and once activated can also be applied for any of its subdomains.

Before you can use Cloudflare for a subdomain, you would have to enable the service for your main domain. You can find out how to enable Cloudflare for your domain in our Cloudflare tutorial.

Once the service is active, to also use it with a subdomain, follow these steps:

1. Go to Site Tools > Speed > Cloudflare icon.

2. Go to the tab Subdomain under Manage Cloudflare Settings where you can find a list of the existing subdomains for your domain and whether Cloudflare is active for any of them. Click the Activate button next to the subdomain you want to activate.

3. Then click View Details for this subdomain and copy the hostname to your clipboard. It should look like: sub.sgdomain.com.cdn.cloudflare.net where sub.sgdomain.com is your subdomain.

4. Go to your Site Tools > Domain > DNS Zone Editor. From the drop-down menu choose the domain Cloudflare has been activated for, in our example that would be sgdomain.com.

5. Once the zone is loaded find the records for subdomain sub.sgdomain.com – you should see two entries for a CNAME type record and if you have SPF and DKIM enabled, two for TXT type record. If you see the TXT records, delete them by clicking on Delete next to them.

6. Click on Edit for the CNAME record for sub.sgdomain.com and paste the Cloudflare hostname you copied in step 3 and click on Confirm.

7. Allow a few hours for DNS propagation. That’s it, you have activated Cloudflare for your subdomain.

There is also no problem to use Cloudflare PLUS with a subdomain. Just like the Free version of the service, Cloudflare PLUS is enabled and works with a specific domain, and can also be applied for any of its subdomains. When Cloudflare PLUS is activated for your domain, there are no additional fees required to also use it with any of its subdomains. Cloudflare PLUS can be activated for a subdomain in the same way as with the Free service.

Share This Article