How to set up a root (non-www) domain on Cloudflare

Instructions on how to point your root (non-www) domain to your live static site with Cloudflare (e.g. https://yourdomainname.com)

If you’d like to start using Cloudflare as your DNS provider:

Step 1a.
Create a Cloudflare account here

Step 2a.
Add your domain

Step 3.
Select the free plan

Step 4a.

Cloudflare will perform a quick scan to pull in your existing DNS records which is pretty sweet since it saves you an extra step of copying in your DNS records manually.

Verify that DNS records below are configured correctly, then press Continue.

Step 5a.

Cloudflare will present you with NS records which you’ll need to add to your domain registrar (e.g. GoDaddy, name.com, etc)


PLEASE NOTE: If your email is configured through your DNS records, this step will likely result in a few minutes of downtime for your email.

Step 6a.

Cloudflare then leads you through a few optimization questions – you can leave all the defaults.

How to set up a root (non-www) domain on Cloudflare

(e.g. https://yourdomainname.com)

Step 1b.

In your Strattic Dashboard, go to your site, and then click on “Details”

Step 2b.
a) Click “Domain” from the menu

b) Enter your custom domain (i.e. yourdomainname.com)

c) Click “Continue”

Step 3b.
You’ll see a CNAME record displayed that is used to verify that you own this domain so that the SSL certificate can be generated.

Step 4b.

Add the CNAME into Cloudflare like in the screenshot below.

For the “Name”, you’ll only need the initial part
(e.g. _d2d081aafd36c470a1b632f29ddb63d5111) and you don’t need to include the domain name.

Please make sure to use the Proxy status of “DNS only” by clicking on the cloud icon.

Step 5b.
Please wait up to 30 minutes for this verification process to complete.

Once your SSL certificate is set up, you can move on to the final steps for pointing your domain to Strattic.

You’ll see a CNAME like this in your Strattic domain settings:

Step 6b.
Add the next CNAME record that displays in the Strattic Dashboard to Cloudflare as follows. Please make sure to use Proxy status of “DNS only” by clicking on the cloud icon

Step 7b.
Add a new CNAME record to Cloudflare as follows with www for the “Name” and your domain name as the “Target”. Please make sure to use Proxy status of “Proxied”

Step 8b.
Go to Rules > Page Rules, then click the Create Page Rule button.

Step 9b.
Create a page rule as follows:

If the URL matches: *www.yourdomainname.com/*

Forwarding URL: https://yourdomainname.com/$2

Step 10b.

SSL in Cloudflare should be set to “full”

Step 11b.

That’s it! You may need to wait up to 24 hours for the DNS to finish propagating properly.

Also, don’t worry about the DNS record saying “Heads up!” in the Strattic Dashboard (it’s because of the root domain setup) – you’re still good to go 👍

FAQ / Troubleshooting

When should we use Cloudflare’s DNS only setting?
When set to DNS Only, Cloudflare doesn’t touch your traffic at all. We ask you to set DNS only on the CNAME record that is used for generating your SSL certificate (Step 4b).

Unless you choose to use Cloudflare settings for your domain, then we also ask you to set the CNAME for your root record to DNS only (Step 6b) .

When should we use Cloudflare’s proxied (orange cloud) setting?
As we want to use Cloudflare’s page rules to redirect the www. domain to your root, you should set the www. record to proxied (Step 7b).

Why isn’t my SSL certificate being issued?
In most cases, this occurs for two reasons.

Firstly, make sure you have set the SSL CNAME to DNS only as seen in Step 4b.

Next, if your DNS contains CAA records, you need to add both of the following CAA records in order to allow Strattic (via Amazon) to issue your SSL certificate for your live site.

Type: CAA.
Name: example.com

Tag: issue

CA domain name: amazon.com

Type: CAA.

Name: example.com

Tag: issuewild

CA domain name: amazon.com

If these two options haven’t solved your issue, please contact our live chat support.

Can we use the Cloudflare’s CDN?
Using Cloudflare’s CDN on top of Strattic would be fine and we have many customers who are doing that. However, you would need to purge the Cloudflare cache every time you do a Strattic Publish. Strattic enterprise customers can perform this purge via a webhook.

Strattic is an end-to-end managed WordPress static publishing and hosting platform.
Try it free for 14 days, no credit card required.

Did this answer your question?