Wordpress, DNS, Canonical headers, sitemaps

Hello community, I hope that 2018 has started well for all of you :slight_smile:

I’m new to CDN and I have a lot of questions, but first some background:

My account type here on CF is Free.

I’m on Aruba Business Hosting with SSL certificate and 301 https redirect already set, I got no duplicate content since I installed wordpress after the certificate. I’m currently using Wp-Rocket as cache plugin and Yoast for SEO.

Reading some online guides on the use of CDN I have discovered that sometimes there is a problem of duplicate content, especially with regard to images. In these guides it is recommended to set up the Canonical Header, so as to give instructions to search engines on the fact that the images served by the CDN are a “copy” of those on the site of origin. Do i have to make such process using Cloudflare? If yes, where and how can i do that?

Continuing to search I discovered that it is good practice (correct me if I’m wrong) to change the links of the assets on the site of origin, directing them to the CDN. Example: original image link “http://example.com” → to “http://cdn.example.com”. I found this suggestion on Yoast website here: Images in XML sitemaps • Yoast
Do i have to do such thing?

The thing that sends me into confusion about everything I wrote above is Wp-Rocket. If I select the “Show Cloudflare Tab” a warning showing telling: “The CDN settings below does not aplly to Cloudflare”.

(The image come from the web,just to let you know what the “settings below” are about)

Now, if that is true means to me that all the things that i wrote above…are not to consider anymore.

Maybe i read too mutch online documents…i’m confused :smiley:

Cloudflare is a “transparent” CDN. It pulls content from your server and delivers it to your visitor via the same ol’ URL your website has always used. Some static content, such as images, it will hold on to for a period of time to save it a trip to re-get that file. Visitors will never tell the difference (unless they dig around), and there’s no special URL or CNAME for this.

You won’t need the 301 redirect (though it doesn’t hurt) if you enable “Always Use HTTPS” on Cloudflare’s SSL/TLS app.

So there’s no need to check that “Enable CDN” option or plug in anything else in the lower half of that WP-Rocket CDN tab. Cloudflare is all you’ll be using.

Thak you sdayman! You solved almost all of my doubts in such a short mount of time :smiley:

What is better? 301 Forwarding, “always use HTTP” or are they the same?

Always Use HTTPS will be faster, as the Forward will happen at Cloudflare instead making the extra hop to your server.

1 Like

Thank you @sdayman , you have been very helpful.
Have a nice day!

1 Like