Partial (cname) setup on main domain

Hi, we want to use Cloudflare on our main domain and some of its subdomains.
We have to keep the DNS-s as they are, so we are planning to buy the business plan and use the partial setup, but we have some worries about the implementation.

At the moment our DNS-s are managed in Azure (+mail) by other company and we have to give them the exact records that they must add, so it will work.
In the instructions for Partial (c name) setup you wrote:
“At your authoritative DNS provider:
Remove any existing A, AAAA, or C NAME records on the hostname you want to proxy to Cloudflare.
Add a C NAME record for {your-hostname}.cdn.Cloudflare.net.”

At the moment our main domain “@” and “dev” are managed by A records pointing to IP address of the Amazon EC2 instance. We also have C NAME for “www” leading to the main domain and few other A records and Cnames to different addresses and subdomains. We use API on sub domain which we also want to keep.

We want to start with the DEV subdomain and if everything works fine to change the cname for the main domain.

What we have to do, what records we have to add/remove, to keep our system working and to redirect our main domain and dev subdomain to Cloudflare while keeping other subdomains working?

Do we have to add another website for the dev or we can add only the main domain, verify it via Verification TXT Record and then manage the Cnames and A records for the main domain and subdomains separately?

Thank you in advance!

While you can technically set up the naked domain on a CNAME setup, your domain’s authoritative nameserver should not allow such a set up, as CNAME records cannot be configured for the naked domain.

That is, if you were referring to your naked domain by “main domain” and in that case you would need a standard setup and change your nameservers.

Otherwise you simply add the domain to Cloudflare, purchase a Business plan, switch over to the CNAME setup, add the desired hostnames to Cloudflare, and configure the records with your authoritative, so that they point to Cloudflare.

Hi Snadro, thank you for the answer!
That is my problem - how to configure the records with my authoritative to point to Claudfalre? As you said in the beginning I can’t setup C NAME for the main, naked… domain (example.com), so what or how should I do that? I can add CNAME for dev.example.com but how to do it for example.com?

First question, do you want the naked domain on Cloudflare as well?

Though, https://developers.cloudflare.com/dns/zone-setups/partial-setup/setup/ should have all the information.

I believe that Azure DNS has an Alias type, which can be used to create a CNAME at the root of the domain.

According to DNS standards, you cannot have a CNAME at the root, but similar to Cloudflare CNAME Flattening, the Alias will do magic to make the CNAME work.

This will work, just be aware that Cloudflare will technically not support this setup. (Mainly I suspect because most DNS providers do not have the root CNAME magic.)

That is the exact place that I quoted in my original post. It says Add a CNAME record for {your-hostname}.cdn.cloudflare.net, but also - Limitations Since CNAME records are not allowed on the zone apex ( example.com ), you can only proxy your zone apex to Cloudflare if your authoritative DNS provider supports [ CNAME Flattening ] - https://developers.cloudflare.com/dns/zone-setups/partial-setup/

Hence my question.

But as mentioned.

Thank you very much Michael!
I’ll check that solution and give a feedback!

All right, assuming you do not want to use Cloudflare on your naked domain (or your authoritative nameserver provides semi-support for CNAME records), you’d simply follow the mentioned steps and then add the records to your authoritative nameserver and point to the cdn.cloudflare.net hosts.

Is there something not clear?

It might be not clear in the original post… I need to use Cloudflare for example.com and selected subdomains, but without changing the DNS-s.
The only solution is with business plan and a partial C NAME setup, but it’s not applicable to example.com, because I cant add C NAME for it.
That’s what I know from the beginning and is mentioned in the main post and this is the reason that I started the discussion.

I need to know how to do that without changing DNS-s (and I can’t use C NAME) for the example.com.

I’ll try to find some more info on the information for Alias that Michael gave me.

The problem is it is not clear what you meant by main domain.

If you meant the naked domain, then you can’t do that, unless your authoritative nameserver provides a sort of flattening. If Microsoft does that - that’s something you need to clarify with Microsoft - then you can

Cloudflare will not prevent you from adding a record for the naked domain.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.