Your origin server stays where the site really lives; the CDN is a layer in front of it. The closer the edge is to the visitor, the lower the latency and the fewer requests reach your hosting.
How it works
- A visitor requests an image from your site and the request lands on the nearest CDN edge.
- If the image is cached there (cache HIT), it’s sent immediately.
- If not (cache MISS), the edge fetches it from the origin and keeps it for the next requests, according to the
Cache-Controlheaders.
You can see which happened in the response headers in your browser’s developer tools, for example:
cf-cache-status: HIT
cache-control: public, max-age=31536000
Ways to connect a CDN
| Method | How it works | Example |
|---|---|---|
| Change nameservers | The CDN runs the domain’s whole DNS and proxies traffic | Cloudflare |
| Asset subdomain | A CNAME like cdn.example.com points to the CDN |
Static-file CDN providers |
Extra benefits
- Absorbing part of a DDoS attack before it reaches the server.
- Compressing files and serving them over HTTP/2 and HTTP/3.
- Depending on settings, keeping cached files available for a while if the origin goes down.
Common problems
- Visitors see an old version: purge the CDN cache after changes.
- ERR_TOO_MANY_REDIRECTS: usually Cloudflare’s “Flexible” SSL mode while the site itself redirects to HTTPS. Use “Full (strict)”.
- Error 521: the CDN can’t connect to your origin server.
- Caching private pages: never cache cart, login or dashboard pages.
On ArabyHost
Not every site needs a CDN, but it helps when your visitors are spread across countries far from our data center in Germany. You can put Cloudflare or another CDN in front of your hosting by following the Cloudflare guide. Because a free SSL certificate is issued on the server through AutoSSL, you can use “Full (strict)” mode; just keep the record as DNS only until the first certificate is issued. Many WordPress sites are well served by LiteSpeed Cache on the server alone.
FAQ
Does a CDN replace good hosting?
No. A CDN speeds up static files and cached pages, but dynamic requests such as checkout and login always reach the origin server.
Does a CDN affect SEO?
Indirectly, by improving load times and Core Web Vitals. It causes no indexing problems as long as visitors and search engines get the same content.
Do I need a CDN if all my visitors are in one country?
If the server is close to them, the benefit is smaller, though it still offloads traffic and absorbs some attacks. If the server is far away, the gain is obvious.