Skip to content
hostcomplex

What Is a CDN

Maarten Soetens 2 min read

How a Content Delivery Network Routes Visitors

What is a CDN? A CDN, or content delivery network, is a group of servers spread across many cities and countries. Each server stores copies of a website's files and sends them to visitors from the location nearest to them.

The network sits in front of the website's main server, called the origin server. When a visitor requests an image or stylesheet, the request is routed to a nearby edge server rather than to the origin. If that edge server already holds a valid copy, it replies at once. If not, it fetches the file from the origin, keeps a copy for later visitors, and then replies.

Routing is handled automatically by the network, based on where the request comes from, so visitors never choose a server themselves. The locations that make up this network are described in the article on CDN edge locations.

Why Sites Use a CDN: Speed, Load and Resilience

The first benefit is speed for distant visitors. Data takes time to travel long distances, and every network hop adds delay. A visitor in Sydney waiting for files from a server in Amsterdam faces a longer wait than one who receives the same files from a Sydney edge server.

The second benefit is less work for the origin. Because most requests for static files are answered at the edge, the origin serves fewer requests and uses less bandwidth. This helps during traffic peaks, such as a product launch or a news story that suddenly draws many readers.

The third benefit is resilience. A network with many servers can absorb large bursts of traffic. Depending on its settings, it can also keep serving cached copies while the origin is briefly unavailable. Whether these gains justify the added setup for a given site is discussed in the benefits and drawbacks article.

Frequently asked questions

Does a CDN host my website?

Not in the usual sense. A CDN stores copies of your files and delivers them, but your main files and application usually remain on your web host, which acts as the origin. Some providers offer both services, and a few static sites are served entirely from a CDN. The difference is explained in the CDN vs web hosting comparison.

Can a CDN speed up dynamic pages?

Partly. A CDN speeds up static files such as images, CSS and JavaScript most easily. Dynamic pages that differ for each visitor, such as a logged-in account or a shopping cart, usually cannot be stored and reused, so those requests still travel to the origin. Some CDNs can accelerate them in other ways, but the gains are usually smaller.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.