Websites · Glossary

What is a CDN?

A CDN, or content delivery network, is a network of servers in many locations that keeps copies of a website's files and serves each visitor from a nearby server. Shorter distances mean faster pages, and spreading requests across many servers lets a site handle sudden traffic without slowing down or going offline.

Distance still matters on the internet: a request that travels from Perth to a server in Virginia and back takes noticeably longer than one answered in Sydney. A CDN removes most of that distance.

· Co-founder

3 min read · Published

How a CDN works

The site's original files sit in one place, called the origin. The CDN copies them to edge servers in many cities. When a visitor requests a page, DNS or routing sends them to a nearby edge, which serves the file from its cache or fetches it from the origin once and keeps it for the next visitor.

What it improves

Speed, because files travel a short distance. Reliability, because many servers share the load and one failing does not take the site down. Capacity, because a post that goes viral is absorbed by the network. And often security, because the CDN can filter malicious traffic before it reaches the origin.

What gets cached

Images, styles, scripts and fonts are cached for a long time, because their content rarely changes and new versions get new file names. Pages are cached for shorter periods so updates appear quickly. Anything personal, such as a cart or a checkout, is not cached and goes to the service behind it.

Common mistakes

Caching pages so long that updates take hours to appear, uploading huge images that no network can make fast, and serving the same file under changing names so caches never warm up. A CDN makes a light site fast; it cannot rescue a heavy one.

Where it shows up in OneCraft

Published sites are static files served from a CDN. Pages are cached for 60 seconds so a new publish shows quickly, while the shared runtime files and your uploaded media are cached for a long time because their names change when their content does. Custom domains are served from the same network with a managed certificate.

Questions people ask

Do small business websites need a CDN?

They benefit from one even with local customers, because a CDN also speeds up repeat visits, absorbs spikes and adds resilience. Most website platforms include a CDN, so it is rarely something a small business has to set up or pay for separately.

Will a CDN make my site rank higher?

Indirectly. Faster pages improve the experience measures search engines look at and keep visitors from leaving, which helps. A CDN alone will not lift a page with weak content, but slow loading can hold back a good page, especially on phones.

Why do changes to my site not show straight away?

Edge servers may still hold the previous version of a page until its cache time ends. Short page cache times keep this to a minute or so. If a change still does not show, reload with the cache bypassed or check from another device.

Is a CDN the same as hosting?

Not quite. Hosting is where the original files or application live. A CDN sits in front, copying and serving files from many locations. Many platforms combine both, storing the files and delivering them through their CDN, so owners see one service.

Does a CDN protect against attacks?

Many CDNs absorb floods of traffic and filter some malicious requests before they reach the origin, which protects small sites from simple attacks. They do not fix weak passwords or insecure code, so the rest of security still matters, including account passwords and updates.

Make one with websites

The button opens the generator with this use case already described. Change the wording to match your own.

Create a website with OneCraft

Related questions

Sources

Written and checked by the OneCraft team. Last checked .