Search code examples
cloudflare

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


I've let cloudflare manage the DNS of my example.com

I have created id.example.com for country's specific customer. I've done it by created cname id with alias example.com

I need to create customer portal: my.id.example.com. How?


Solution

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

    If domain.example 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