Redirect root domain to WWW with CNAME setup

We have been using Cloudflare with the CNAME setup, our on premise DNS servers are still doing some heavy lifting with name. We are wanting to move our root domain and www to Cloudflare, but cannot put a CNAME for the root domain. Anyone experienced this issue and have any suggestions on how to work around it? Pointing www to CF is easy enough, just the root domain is an issue.

We could setup a web server, point root domain to an A record for a web server which then redirects to www. Any other ideas?

The naked domain technically cannot be a CNAME entry. That is why Cloudflare provides “flattening” in this context, as any CNAME entry will be on-the-fly converted to A entries. Other DNS providers may have similar features, but if you have a vanilla DNS service, you most likely won’t have that support. That’s something you would need to clarify with your DNS provider.

With your requirements, I would suggest to switch to a full setup, where Cloudflare manages your DNS entries, among them the naked domain. If that is not an option, you can only talk to your DNS provider or not have the naked domain on Cloudflare but e.g. redirect to www.

Switching to full setup was where we were thinking, just trying to avoid moving ~1,000 entries unless we need to. Un/fortunately we are our DNS provider with our own hosted dns severs that don’t support flattening like Cloudflare does.

The 1,000 entries should be easy to move with a DNS import. If your DNS servers do not support that, then you won’t be able to set up a CNAME entry for the naked domain.

What you could do, is resolve the hostname provided by Cloudflare manually to its IP address and configure that IP address, however that may break at any time.

To recap, I would go for a full setup or alternatively simply redirect.

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