A CDN, or content delivery network, is a group of servers spread across many countries. It keeps copies of your images, scripts and styles close to your visitors. When someone opens your site, files come from the nearest location. Pages load faster, and your main server works less.
How it works
Your website stays on your hosting server, called the origin. The network fetches files from the origin the first time they are requested. Then it stores them for a set time. Later visitors in the same region receive the stored copy within milliseconds.
Benefits of a CDN
- Faster loading for visitors far from your server.
- Less bandwidth and CPU used on your hosting plan.
- Better resistance to traffic spikes.
- Extra protection against some DDoS attacks.
- Free or cheap certificates at the edge.
When you need one
If most visitors live near your server, the gain is smaller. If you sell internationally or publish many images and videos, the gain is large. Busy stores and media sites benefit the most. Small local sites can often wait.
Setting it up
- Create an account with the network provider.
- Add your domain and point DNS as instructed.
- Choose which files to cache and for how long.
- Purge the cache after major updates.
- Test pages from different countries.
Things to watch
Do not cache pages that change for each visitor, such as carts and account pages. Make sure your SSL settings match on both sides. If something looks outdated, purge the cache first.
Combine the network with fast hosting for the best results. Our cloud hosting pairs well with a CDN for global audiences. Add DDoS protection for public services that attract attacks.
Free and paid options
Several providers offer a free tier that suits small sites. Paid plans add features such as image optimisation, better routing and detailed reports. Start with the free tier, measure the gain and upgrade only if you need more. Many sites see faster pages within a day.