Confirming correct DNS setup


We’ve recently added Cloudflare and setup the APO plugin within our WordPress site. We’re looking to confirm if we’ve correctly setup our DNS with everything.

We’d like all users to be directed to the version of our site.

In Cloudflare we’ve set the following records:

A record - - IP Address
CNAME - www - 

In WordPress our site’s url is We’ve also inserted this into our htaccess file to redirect all users to instead of

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

We’ve activated the APO and it says it’s running on both www and the root. Siteground is our host and everything looks to be good there.

Is this the optimal setup for using Cloudflare and it’s APO services?

Thank you for your help.

I guess that works. I’m not a fan of CNAMEs unless absolutely necessary. I would have ‘www’ as an “A” record with an IP address, just like the naked domain.

And to make the redirect faster, I’d use the following tutorial rather than .htaccess:

1 Like

I see, and to your knowledge should the APO work with having page rule redirect as outlined in the tutorial? If we implement the page rule via Cloudflare we should just remove the htaccess redirect then, correct?

APO will cache whatever URL your site uses, and I can confirm it’s working.

The page rule redirect just does the same thing as your .htaccess. You won’t need that .htaccess rewrite due to the Page Rule.

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