Using Cloudflare with a naked domain (not www)

I’m having a really hard time and can’t find any good info on this. I DO NOT want my site to resolve as www.example.com, I just want a naked domain https://example.com.

I’m using Siteground (SG) now for hosting, where you can setup Cloudflare (CF) through SG’s cPanel, however it REQUIRES your site resolve as www which blew my mind. I took it off CF CDN through Siteground, re-added in CF and pointed my nameservers straight to CF.

All was well for 24 hours, now my site is down. I called Siteground, they said I had to add www in my DNS settings in CF, either as an A Record or CNAME. They said it should be back up in @10 minutes afterward. It’s not yet, but even if it is, I want there to be a public resource for this; I can’t be the only one who wants a naked domain while using CF’s CDN.
Is it normal that there’s not a record for www automatically? Is that an A record everyone with a naked domain will need to add manually?
Should that A record be an “orange cloud” with HTTP proxy?
Is there anything else we need to know when doing a naked domain with a CDN?

1 Like

P.S., it does appear my site is resolving properly now (yay!) but I still want this topic to be available for others. There is another topic that comes up in Google search results “Can I use a naked domain (no www) with Cloudflare?” ](https://support.cloudflare.com/hc/en-us/articles/200169886-Can-I-use-a-naked-domain-no-www-with-Cloudflare-)
However, it takes me to an OOOPS! YOU DON’T HAVE ACCESS TO THIS PAGE

The only way to resolve this problem is - avoid using cPanel option.

Use Cloudflare directly by opting it manually.

1 Like

Right, that’s what I’m doing, but how was I supposed to know that I needed to add a DNS record for “www”? Why wasn’t there there automatically? Where are the instructions informing anyone that they need to add a record for “www”?

Siteground has clearly written about that

The Cloudflare service is only used when the website is accessed with WWW.
Ref: https://www.siteground.com/tutorials/Cloudflare/enable/

Thank you @anon13899255, but I’m not really looking for advice just for Siteground users, I’m looking to add a resource/instructions for ANYONE who wants to use Cloudflare with a naked domain.

www records aren’t a required thing. They only need to exist if they are being used and if they are supposed to point to something. If at the time you added your domain to Cloudflare directly the www was in use by siteground, the true origin IP address was obfuscated and Cloudflare couldn’t add it for you. During the signup process a list of records imported is presented along with test to verify all the needed ones were there.

Glad you have it sorted.

-OG

I firmly believe, it would be already added since you updated your nameservers.

I would repeat my answer … If you use Cloudflare from cPanel option, it wont work for non-www version. It will work only for www version due to its limitation, this has been clearly stated in Siteground docs.

Solution

If you want to use Cloudflare there are two options

  • Either switch to Cloudflare manually, avoid cPanel way. (I would recommend this way)

Sign up Cloudflare with new email > add your domain > update new namservers . . .

  • Or move your site from non-www to www.

TLDR

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.