Infrastructure & Networking
What is a CDN?
A CDN, Content Delivery Network, is a geographically distributed network of servers that delivers web content to users from locations physically close to them, reducing the distance data must travel and therefore reducing latency and improving load times. Rather than serving all content from a single origin server in one location a CDN caches and distributes content across dozens or hundreds of edge servers positioned in major population centres around the world, when a user requests a page the CDN routes the request to the nearest edge server rather than to the distant origin.
The core problem a CDN solves is the physical reality of network latency, data cannot travel faster than the speed of light through network infrastructure, and every mile of cable between a user and a server adds measurable delay. A user in Tokyo requesting content from a server in New York experiences significantly more latency than the same user requesting content from a server in Tokyo or Osaka. At web scale where milliseconds affect user experience, conversion rates, and SEO rankings this latency difference is practically significant.
CDNs address the latency problem through caching and geographic distribution, storing copies of content at edge servers near users so that content requests are served from nearby infrastructure rather than from a distant origin. The origin server handles only requests that the CDN cannot serve from cache, content that is new, personalised, or otherwise not cacheable, while the CDN handles the majority of traffic from geographically distributed edge nodes.
For redirect management CDNs are significant in two ways, they are part of the infrastructure through which redirect requests flow, and they are increasingly used to implement redirect logic at the edge, executing redirect rules at the CDN layer rather than at the origin server for faster redirect performance.
How CDNs work
The CDN architecture distributes content delivery across a network of strategically positioned servers, using intelligent routing to serve each user from the most appropriate edge location.
Points of Presence, PoPs: the physical locations where CDN edge servers are deployed. A major CDN may have hundreds of PoPs across every continent, in major cities, internet exchange points, and data centres strategically positioned to minimise the distance between edge servers and end users. Cloudflare operates over 200 PoPs globally. Akamai operates over 4,000. The number and placement of PoPs determines how effectively the CDN reduces latency for users in different regions.
Edge servers: the individual servers within each PoP that store cached content and serve responses to nearby users. Edge servers maintain caches of frequently requested content, HTML pages, images, CSS, JavaScript, fonts, videos. When a user requests content the edge server checks its cache, if the content is cached and fresh the edge server serves it directly without contacting the origin. If the content is not cached or has expired the edge server fetches it from the origin, caches it, and serves it to the user.
Request routing: CDNs use DNS-based or anycast routing to direct users to the nearest appropriate edge server. DNS-based routing returns different IP addresses for the CDN’s domain depending on the user’s geographic location, a user in Europe receives the IP address of a European edge server. Anycast routing assigns the same IP address to multiple edge servers, network routing protocols automatically direct traffic to the nearest server with that IP address.
Origin pull vs origin push: CDNs use two models for populating edge caches. Origin pull, the most common model, edge servers request content from the origin server when users request it and the edge cache is empty. The first user to request content from a given edge server triggers an origin fetch, subsequent users at that edge location are served from cache. Origin push, content is proactively pushed to edge servers before users request it, suitable for large media files and content that should be immediately cached everywhere.
Cache control: CDNs respect cache control headers from origin servers, HTTP headers specifying how long content should be cached and under what conditions it should be revalidated. Cache-Control: max-age=86400 instructs CDN edge servers to cache the response for 86,400 seconds, 24 hours. After the cache expires the edge server either revalidates with the origin or serves stale content depending on configuration. Cache control strategy significantly affects both CDN performance and content freshness.
CDN benefits for web performance
The performance benefits of CDN deployment span multiple dimensions, latency reduction, throughput improvement, origin server load reduction, and reliability enhancement.
Latency reduction: the primary CDN benefit. Serving content from edge servers near users reduces the round-trip time for each request, the time between the browser sending a request and receiving the response. A 50ms round-trip time from a nearby edge server versus a 250ms round-trip time from a distant origin is a 200ms improvement per request. On a page loading 50 resources the cumulative improvement is substantial.
HTTP/2 and HTTP/3 at the edge: major CDNs support HTTP/2 and HTTP/3 on all edge connections, enabling multiplexing and reduced connection overhead between browser and edge server. Even if the origin server only supports HTTP/1.1 users benefit from HTTP/2 and HTTP/3 performance improvements for the browser-to-edge connection, the CDN handles protocol translation between the modern browser connection and the legacy origin connection.
TLS termination at the edge: CDNs perform SSL termination at edge servers, the TLS handshake for HTTPS connections happens at the nearby edge server rather than at the distant origin. A TLS handshake that might add 250ms of latency to a distant origin connection adds only 20ms for a nearby edge connection. TLS termination at the edge is a significant HTTPS performance improvement.
Origin server offloading: CDN caching means the origin server handles only cache misses, a fraction of total traffic. An origin server handling 100,000 requests per day without a CDN might handle only 5,000 requests per day with a CDN that achieves 95% cache hit rates. This offloading reduces origin infrastructure costs and allows the origin to dedicate its capacity to dynamic content that cannot be cached.
Reliability and availability: CDN distribution provides resilience against origin server failures. If the origin server goes down CDN edge servers can continue serving cached content to users, maintaining availability for a period even when the origin is unreachable. CDNs also protect against traffic spikes, sudden increases in traffic, that might overwhelm an origin server are absorbed by the distributed CDN infrastructure.
DDoS protection: major CDNs provide distributed denial of service protection, absorbing attack traffic across their distributed infrastructure before it reaches the origin. A DDoS attack targeting a single origin IP address is ineffective against a CDN where traffic is distributed across hundreds of edge IP addresses.
CDNs and SEO
CDN deployment affects SEO through several mechanisms, primarily through the performance improvements that influence Core Web Vitals and through the SSL and HTTP infrastructure improvements that affect technical SEO signals.
Core Web Vitals improvement: Google’s Core Web Vitals: Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift, are direct ranking signals. CDN deployment improves LCP, the time for the largest content element to load, through reduced latency for HTML delivery and faster loading of images and other large resources served from edge locations near the user.
Global performance consistency: without a CDN site performance varies dramatically by user location, users near the origin experience fast load times while distant users experience slow load times. CDN deployment equalises performance across geographies, users in all regions experience similarly fast load times. Consistent global performance is important for sites with international audiences, slow performance in specific regions affects rankings in those regions’ search results.
HTTPS and HTTP/2 at scale: CDNs provide SSL certificate management, HTTPS enforcement, and HTTP/2 support for all connected domains, simplifying the technical SEO infrastructure. Sites that connect custom domains to CDN infrastructure automatically receive SSL certificates, HTTPS enforcement, and HTTP/2 support without per-domain certificate management.
Crawl budget implications: CDN caching improves Googlebot’s crawl experience, fast, reliable responses from nearby edge servers reduce the time Googlebot spends waiting for responses and increase the crawl rate possible within server load limits. Faster server response times, a direct benefit of CDN edge serving, support higher crawl budget allocation.
CDNs and redirects
CDNs interact with redirect management in two important ways, as infrastructure through which redirect requests flow and as a layer where redirect logic can be implemented.
Redirect processing at the CDN edge: when a user requests a URL that should be redirected the CDN can process the redirect at the edge, without forwarding the request to the origin server. Edge-executed redirects are faster than origin-executed redirects, the redirect response is returned from the nearby edge server in milliseconds rather than requiring a round trip to the distant origin.
CDN edge redirect rules are configured in the CDN platform’s configuration, Cloudflare Page Rules, Cloudflare Redirect Rules, AWS CloudFront Functions, Fastly VCL, and similar mechanisms allow redirect logic to be deployed at the edge. This edge redirect execution is one of the significant advantages of CDN-based redirect management platforms, redirect responses are served from the edge with minimal latency.
CDN caching of redirect responses: CDN edge servers can cache redirect responses, particularly 301 permanent redirects. A cached 301 redirect is served from the edge cache on subsequent requests without processing the redirect logic again, further reducing redirect response latency. However cached redirects can create problems when redirect configurations change, cached old redirects continue to be served until cache expiry even after the redirect rule has been updated.
Redirect management platforms built on CDN infrastructure handle cache invalidation, clearing cached redirect responses when rules are updated to ensure new redirect configurations take effect immediately rather than waiting for cache expiry.
CDN and redirect chains: redirect chains that pass through CDN infrastructure multiply the performance cost of each hop. A redirect chain where each hop requires a CDN-to-origin round trip adds substantially more latency than a chain where each hop is served from the edge. Minimising redirect chains is important regardless of CDN deployment, but the performance case is particularly strong when CDN infrastructure is involved.
SSL and redirect source domains: when redirect source domains, old domains being redirected to new destinations, are connected to CDN infrastructure the CDN handles SSL certificate provisioning for those domains. HTTPS requests to redirect source domains are correctly served with valid certificates, enabling HTTPS redirect delivery rather than certificate errors. CDN-based redirect management platforms provision SSL certificates for all connected redirect source domains automatically.
Geo-based routing at the CDN edge: CDNs can implement geo-redirect logic at the edge, redirecting users to region-specific destinations based on their geographic location as determined by their IP address. A user in Germany requesting example.com might be redirected to example.com/de/: the German-language version, by a CDN edge rule that checks the user’s geographic location and redirects accordingly. Edge-based geo-routing is faster than origin-based geo-routing, the redirect fires from the nearest edge server rather than requiring a round trip to the origin.
CDN configuration for redirect management
Several CDN configuration aspects directly affect redirect management effectiveness.
Edge rules and redirect logic: CDN platforms provide mechanisms for defining redirect rules at the edge. Cloudflare’s Redirect Rules allow path-based, header-based, and parameter-based redirect logic. AWS CloudFront Functions execute JavaScript at the edge for complex redirect logic. Fastly’s VCL, Varnish Configuration Language, provides powerful edge redirect configuration. These edge-level configurations implement redirects with minimal latency, redirect responses from edge servers near users rather than from distant origins.
Cache-Control for redirect responses: configuring appropriate cache control for redirect responses affects how long edge servers cache redirects and how quickly redirect changes propagate. A redirect with Cache-Control: max-age=3600 is cached for one hour, changes to the redirect configuration take up to an hour to propagate as edge caches expire. A redirect with Cache-Control: no-store is never cached, every redirect request is processed fresh, ensuring immediate propagation of configuration changes at the cost of slightly higher processing overhead.
Origin shield: many CDNs offer an origin shield feature, a single designated CDN location that acts as an intermediary between all edge servers and the origin. When edge servers experience cache misses they query the origin shield rather than the origin directly, the origin shield’s cache is checked first, reducing the number of requests the origin server receives. For redirect management infrastructure an origin shield reduces origin load from redirect processing.
Common CDN misconceptions
CDN caching breaks dynamic content: CDNs cache static content, HTML, images, CSS, JavaScript, but can be configured to bypass caching for dynamic content, personalised pages, API responses, authenticated content. Proper cache control header configuration tells the CDN which content to cache and which to pass through to the origin. Well-configured CDN deployments serve cached static content from the edge while forwarding dynamic requests to the origin.
CDN makes SSL certificates unnecessary at origin: even with CDN-level SSL termination the connection between CDN edge servers and the origin server should also be encrypted, particularly for sensitive content. Full SSL mode, encrypting both the browser-to-edge and edge-to-origin connections, is more secure than flexible SSL mode, encrypting only the browser-to-edge connection while the edge-to-origin connection is unencrypted.
CDN deployment is complex and expensive: major CDNs including Cloudflare provide free tiers with substantial functionality, HTTPS, HTTP/2, basic caching, and DDoS protection. CDN deployment for most sites is straightforward, changing DNS records to point to the CDN and configuring basic caching rules. Enterprise CDN configurations can be complex but basic deployment is accessible to any site operator.