Does Cloudflare support CNAME redirect


#1

Currently we set one domain in cloudflare so we can use its CDN and load balancer. For eg abc-example-com

There is another domain in a different DNS server setup in Google Cloud DNS which is abc-old-com so I set up the CNAME record in google DNS form abc-old-com --> to the abc-example-com.

And I am getting the error that cloudflare cannot resolve the DNS. Actually if I tried to do the revert direction such as cloudflare cname point to google dns, it is working…

So is it a limitation of the cloudflare?


#2

It is not a limitiation. CNAMEs are not redirects but DNS pointers. You either need to move the previous domain to Cloudflare as well and perform a proper redirect with page rules or you can unproxy (switching to :grey:) your Cloudflare host and have the request go straight to your IP address instead of Cloudflare’s.


#3

Thanks for your reply. However we want to use cloudflare because cloudflare has a better CDN and WAP function than gcp.

It is interesting that when I tried it with gcp DNS, by adding a cname redirect from cloudflare to gcp dns, it is actually working.
test.cloudflare-example.com.au --> cname --> test.gcp-example.com.au -->(A) --> gcp load balancer IP
This is just test and not the right way as I want.


#4

A CNAME setup like this is only available on a Business or Enterprise Plan.