Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Create Sub-Sub-Domain on Cloudflare DNS?

Tags:

cloudflare

People also ask

Can you create subdomains in Cloudflare?

Add the subdomain to the new Cloudflare account. Create the subdomain's CNAME or A record within the new Cloudflare account. Update the NS records for the subdomain to refer to the new nameservers corresponding to the new Cloudflare account. Delete the subdomain's CNAME or A record within the old Cloudflare account.

How do I create a subdomain domain in DNS?

Click on the DNS tab and scroll to the record card (or quickly jump to the DNS records for that domain by clicking the button in the top right). From there, click the Add record drop-down button, and select the type of record you want to create. A , ALIAS , and CNAME records will all create a new subdomain.


  • In Cloudflare, open the DNS records for domain.com
  • Create a A record for my.id and enter the IP where my.id.domain.com will be hosted, and add record enter image description here
  • Setup the site my.id.domain.com at the IP you specified

If domain.com is on Cloudflare and the Cloudflare nameservers have propagated, the sub-sub domain propagation should be more or less instant

As correctly noted by ThorSummoner and user296526, this will work on the Cloudflare free plan if you aren't using SSL.

If you want to have a sub sub domain with SSL on Cloudflare, you need to a dedicated Cloudflare dedicated SSL certificate which is available as a paid plan. To quote from the Cloudflare site:

Cloudflare Dedicated Certificate with Custom Hostname: $10 per domain per month

Includes all benefits mentioned above for Dedicated Certificates Protects your domain, subdomains (.example.com), as well as up to 50 additional hostnames Can extend protection beyond first-level subdomains (.www.example.com, not just *.example.com) Dedicated SSL certificates typically provision within a few minutes but can take up to 24 hours.

Full details here


The accepted answer works fine only if you are not using SSL. As mentioned by @ThorSummoner, cloudflare wildcard SSL certificate is only valid for your domain anydomain.com and *.anydomain.com. It is NOT valid for ..anydomain.com (Sub Subdomains or fourth level subdomains).

In order to have SSL for your fourth level subdomains, you will have to be on a paid cloudflare plan and will also need to buy a dedicated SSL certificate from within cloudflare control panel.

Please refer to below pages for more info:

https://support.cloudflare.com/hc/en-us/articles/219453397-Can-I-use-CloudFlare-SSL-certificates-on-my-fourth-level-subdomain-

https://support.cloudflare.com/hc/en-us/articles/228009108-Dedicated-SSL-Certificates


You need to create the subdomains at your hosting provider first, then you would come to your CloudFlare DNS settings and enter in the DNS records so that it resolves.


CloudFlare doesn't support true subdomains (i.e., subzones with nameserver delegation). But it does support what you want, i.e. specific records within a subdomain served by the same zone.

Simply create your record as you would any other record, and use my.id as the name (note the dot.) Lookup will work as you would expect it.