After seeing how speed up the loading speed of your Shopify store en optimizing images, pre-loading pages et differing content, let's focus on the importance of CDN.
What is a CDN (Content Delivery Network)?
A CDN speeds up the delivery of your site's content by serving it from the servers closest to your visitors.
How to connect a CDN to your Shopify store?
CloudFlare
First of all it is necessary choose a CDN, there are dozens of them but in this article we will focus on the most popular and which has a free plan: CloudFlare.
Create an account on it and go to the next step.
Connect Cloudflare to your domain name
To benefit from Cloudflare services, you must replace the server you have base with the Cloudflare CDN.
To do this, start by adding your site to Cloudflare:
Select the free offer:
Once this is done you will be asked to verify your DNS records. Unless you know what you are doing, skip this step.
We come to the most important step, modifying "your name servers":
Set this page aside, we'll need it later.
Now that Cloudflare is ready to connect its CDN to our Shopify store, we're going to need to access thehost of our domain name. This step depends on where you purchased your domain name. For this guide, we'll take the most likely: from Shopify. If this is not the case, the approach will remain very similar whether it is at OVH, GoDaddy, Amen, Namecheap etc.
On your Shopify dashboard, go to the section Domain names And click Manage, on the line of the main domain:






Configure Cloudflare to improve speed
On cloudflare, several tabs have appeared, we will go to Speed :
Then configure the 3 sections Automatic minimization, Rocket Loader ™ et AMP Real URL like this and save.
There you go, it's finally 100% complete. Wait an hour for this to take effect 🚀.