# Optimize hosting and CDN

- Check 06.07 · Performance and Core Web Vitals · Important
- Source: https://checklist-seo-geo.com/en/performance-core-web-vitals/optimize-hosting-cdn
- Choose hosting close to your visitors, enable HTTP/2, HTTP/3 and TLS 1.3, then put a CDN in front of the site: Cloudflare, CloudFront or Front Door.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/performance-core-web-vitals/optimize-hosting-cdn.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

Hosting sets the floor for your performance: no page-level tuning makes up for an overloaded server or one located on the other side of the world. The task is to check that the server is properly sized and well located, that its network stack is up to date (HTTP/2, HTTP/3, TLS 1.3), then to put a CDN (Content Delivery Network) in front of the site to serve files from a point close to each visitor.

## Why it matters

Three factors determine a server's response time:

- **Distance.** Each round trip between the visitor and the server takes time, and opening a secure connection requires several of them. A visitor in France served from the US West Coast pays for that trip on every new connection.
- **Load.** On shared or undersized hosting, your site waits for its turn on the CPU. Response time then varies with the time of day and the neighbors' traffic.
- **Protocols.** HTTP/2 carries all requests over a single connection; HTTP/3 opens the connection faster and copes better with the packet loss of mobile networks; TLS 1.3 shortens the handshake.

A CDN addresses the first two: it terminates the connection in a data center close to the visitor and serves everything it can from its cache, without calling on your server. Googlebot crawls mostly from the United States: a CDN also serves it static files from a nearby point.

## What it improves

- **TTFB (Time to First Byte)**: a shorter connection, and an immediate response for whatever is cached.
- **LCP (Largest Contentful Paint)**: images, CSS and fonts arrive faster, especially for distant visitors.
- **Availability**: the CDN absorbs traffic peaks and part of the attacks. Fewer 5xx errors seen by crawlers.
- **Crawling**: a fast, stable server gets crawled more; the effect is noticeable on large sites.
- **Costs**: less bandwidth and CPU at the origin.
- **Rankings**: no direct effect. Server location is at best a weak geotargeting signal; it acts mainly through speed.

## How to check

Detect the presence of a CDN, the HTTP version and whether HTTP/3 is advertised:

```bash
curl -sI https://example.com/ | grep -i -E "^(server|via|age|alt-svc|cf-cache-status|x-cache|x-served-by|x-vercel-cache):"
curl -sI -o /dev/null -w "HTTP/%{http_version}\n" https://example.com/
```

Compliant result: at least `HTTP/2`, an `alt-svc: h3=":443"` header if HTTP/3 is active, and a cache header (`cf-cache-status`, `x-cache`) if a CDN is in place.

Then measure the TTFB of a static file and of a page, at several times of day, with the `curl` command from the check [target TTFB ≤ 800 ms](https://checklist-seo-geo.com/en/performance-core-web-vitals/target-ttfb-800-ms-as-benchmark). A multi-location testing tool such as WebPageTest shows the gap between a nearby visitor and a distant one.

Finally, check where the server is located: the information is in the host's control panel.

## How to implement

### Step 1 — Choose the type of hosting

| Type | Suited to | Limits |
|---|---|---|
| Shared | Brochure site, moderate-traffic blog | Shared resources, few settings, variable performance |
| VPS or cloud server | Dynamic site with steady traffic, online store | System administration to handle |
| Managed hosting (managed WordPress, PaaS) | Team without a system administrator | Higher cost, less freedom |
| Static or serverless behind a CDN | Site generated at build time, JavaScript application | Requires a suitable architecture |

Decision criteria: TTFB of an uncached page, stability of that TTFB at peak times, available PHP or Node.js version, presence of a server cache, data center region.

### Step 2 — Choose the region

Host the origin in the region where most of your visitors are. Put the database in the same data center as the application: a few milliseconds between the two get multiplied by the number of queries on each page. For a worldwide audience, keep a single origin and rely on the CDN cache.

### Step 3 — Update the stack

- Recent, maintained version of the language, code cache enabled (OPcache for PHP).
- HTTP/2 and HTTP/3, TLS 1.3, persistent connections.
- [Brotli or Gzip compression](https://checklist-seo-geo.com/en/performance-core-web-vitals/enable-brotli-gzip).
- Enough PHP-FPM processes or instances for peak traffic.

### Step 4 — Put a CDN in front of the site

Prefer a full-proxy CDN, which serves the whole domain, over a CDN limited to a static file subdomain: you avoid an extra connection and you will be able to cache HTML. Then configure [browser and server caching](https://checklist-seo-geo.com/en/performance-core-web-vitals/configure-browser-server-caching), otherwise the CDN keeps almost nothing.

> **Warning:** a CDN often comes with a web application firewall and bot protection. Poorly configured, they block Googlebot or generative engine crawlers. See [check CDN, WAF and anti-bot protection](https://checklist-seo-geo.com/en/crawling/check-cdn-waf-anti-bot-protection).

### Apache

Versions: Apache 2.4.17 and later (native HTTP/2).

HTTP/2 requires `mod_http2` and an `event` or `worker` MPM; it does not work properly with `mpm_prefork` and `mod_php`.

```bash
sudo a2enmod http2 ssl
```

In the HTTPS virtual host:

```apache
Protocols h2 http/1.1
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
KeepAlive On
```

The `SSLProtocol` line keeps only TLS 1.2 and TLS 1.3. Apache does not support HTTP/3: put a CDN or a proxy in front if you need it. Reload with `sudo apachectl configtest && sudo systemctl reload apache2`.

### Nginx

Versions: Nginx 1.25.1 and later (up to 1.30 stable and 1.31 mainline); Nginx 1.18 to 1.24 without HTTP/3.

In both cases, open the virtual host file (`/etc/nginx/sites-available/example.com` or `/etc/nginx/conf.d/example.com.conf`), then test and reload:

```bash
sudo nginx -t && sudo systemctl reload nginx
```

#### Nginx 1.25.1 and later

Nginx must be compiled with the HTTP/3 module (`--with-http_v3_module`, included in the official nginx.org packages; check with `nginx -V`). This module is still marked experimental in the Nginx documentation.

```nginx
server {
    listen 443 ssl;
    listen 443 quic reuseport;
    http2 on;
    http3 on;
    server_name example.com;

    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 1d;

    add_header Alt-Svc 'h3=":443"; ma=86400' always;
}
```

Open port 443 for UDP on the firewall: HTTP/3 relies on QUIC, and therefore on UDP. The `reuseport` parameter can only be declared on a single `server` block.

#### Nginx 1.24 and earlier

These versions, still shipped by Debian 12 and Ubuntu 24.04, do not support HTTP/3 and do not know the `http2 on` directive: HTTP/2 is enabled on the `listen` line.

```nginx
server {
    listen 443 ssl http2;
    server_name example.com;

    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 1d;
}
```

To get HTTP/3, install Nginx from the official nginx.org repository or put a CDN in front of the site.

### LiteSpeed

Versions: LiteSpeed Web Server 6 and OpenLiteSpeed 1.7 and later.

HTTP/2 and HTTP/3 are supported natively and enabled by default on LiteSpeed Web Server and OpenLiteSpeed. Check that port 443 is open for UDP.

### Caddy

Versions: Caddy 2.6 and later.

Automatic HTTPS, HTTP/2 and HTTP/3 are on by default. Open port 443 for UDP.

### IIS

Versions: IIS 10 (Windows Server 2016 to 2025); HTTP/3 from Windows Server 2022.

HTTP/2 has been on by default since Windows Server 2016. HTTP/3 is available from Windows Server 2022, with TLS 1.3, and has to be enabled at the system level: follow the Microsoft documentation for your version.

### Cloudflare

Versions: Cloudflare dashboard, all plans, November 2026.

1. Add the domain, then replace the nameservers at your registrar with the ones Cloudflare gives you.
2. In the [`DNS`](https://dash.cloudflare.com/?to=/:account/:zone/dns/records) tab, switch the site's records to proxied (orange cloud).
3. In [`SSL/TLS`](https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls), choose the “Full (strict)” mode with a valid certificate on the origin. “Flexible” mode leaves the leg to the origin unencrypted and causes redirect loops.
4. Check in the [Speed settings](https://dash.cloudflare.com/?to=/:account/:zone/speed/optimization) (Protocol Optimization tab) that HTTP/3 is enabled.
5. Enable [Tiered Cache](https://dash.cloudflare.com/?to=/:account/:zone/caching/tiered-cache) in the `Caching` section.

HTTP/2, HTTP/3, TLS 1.3 and Brotli are then served by Cloudflare, whatever the origin's stack. Menu labels change over time: refer to the documentation if they differ.

### AWS

Versions: AWS console (CloudFront, EC2, RDS) and AWS CLI v2, November 2026.

**CloudFront**:

1. In the [CloudFront console](https://console.aws.amazon.com/cloudfront/v4/home), create a distribution with your origin: S3 bucket (with origin access control), Application Load Balancer or server.
2. In the settings, enable HTTP/2 and HTTP/3 under supported HTTP versions.
3. On the default behavior, enable compression and choose a cache policy (`CachingOptimized` for static files).
4. Choose the price class that covers your audience's regions.

```bash
aws cloudfront get-distribution-config --id IDENTIFIANT --query "DistributionConfig.HttpVersion"
```

The command should return `"http2and3"`. On the origin side, place the **EC2** instances and the **RDS** database in the same region, close to your visitors.

### Google Cloud

Versions: Google Cloud (Cloud CDN, external Application Load Balancer, Firebase Hosting, Cloud Run), console and gcloud, November 2026.

Enable **Cloud CDN** on the backend service of an external Application Load Balancer, then HTTP/3 on the target HTTPS proxy:

```bash
gcloud compute backend-services update NOM_DU_SERVICE --global --enable-cdn
gcloud compute target-https-proxies update NOM_DU_PROXY --quic-override=ENABLE
```

**Firebase Hosting** includes a CDN with no configuration. For **Cloud Run**, choose the region closest to your audience.

### Azure

Versions: Azure portal (Azure Front Door Standard and Premium, App Service, Static Web Apps), November 2026.

**Azure Front Door** (Standard or Premium) acts as a CDN and global entry point: create a profile, add your origin (App Service, storage, server) and associate the domain. On **App Service**, choose your audience's region and turn on “Always On” to keep the application from going idle. **Static Web Apps** includes global distribution.

### Fastly

Versions: Fastly Deliver, all plans, November 2026.

Create a service, declare the domain and the origin, then enable shielding on a point of presence close to the origin: the other points of presence go through it instead of each calling on your server. HTTP/3 is enabled at the service level: follow the Fastly documentation.

### Plesk

Versions: Plesk Obsidian 18.0 for Linux.

Nginx as a proxy in front of Apache and HTTP/2 are on by default on Plesk for Linux. In `Websites & Domains > your domain > PHP Settings`, choose a recent PHP version and an FPM handler. For the CDN, put Cloudflare or an equivalent in front of the domain by editing its DNS zone.

### cPanel

Versions: cPanel & WHM 110 and later (Jupiter theme).

Protocols depend on the host. On your side: “[MultiPHP Manager](https://docs.cpanel.net/cpanel/software/multiphp-manager-for-cpanel/)” for the PHP version and PHP-FPM, then a proxy CDN in front of the domain by changing the nameservers.

### Shared hosting

Check three things in the control panel: a recent PHP version, a data center in your target country, HTTP/2 enabled. Turn on the host's CDN option if there is one, or put Cloudflare in front of the site. Change plan when the TTFB of an uncached page stays high despite the CMS cache, or when it varies widely depending on the time of day.

### Vercel

Versions: Vercel platform, all plans, November 2026.

The CDN is built in. Set the function execution region close to your database, in `vercel.json`:

```json
{
  "regions": ["cdg1"]
}
```

`cdg1` stands for Paris.

### Netlify

Versions: Netlify platform, all plans, November 2026.

Built-in CDN, no configuration needed. The function execution region is chosen in the site settings, depending on the plan.

### WordPress

Versions: WordPress 6.4 and later, Cloudflare plugin 4.x.

- A managed WordPress host provides a server cache, recent PHP and a CDN already configured.
- On conventional hosting: page cache, then Cloudflare in front of the domain. The official Cloudflare plugin purges the cache on each publication.
- Do not stack a URL-rewriting CDN (`cdn.` subdomain) and a proxy CDN: one is enough.

### Shopify

Versions: Shopify, all plans, November 2026.

Hosting and a global CDN are included and cannot be configured. Wix, Squarespace and Webflow work the same way.

### Laravel

Versions: Laravel 10 to 13.

Laravel Cloud, Forge or Vapor handle the server, PHP-FPM and protocols. To serve compiled assets from a CDN domain, set in `.env`:

```ini
ASSET_URL=https://cdn.example.com
```

The `asset()` function and `@vite` then generate URLs on that domain. With a proxy CDN on the main domain, this variable is unnecessary.

### Next.js

Versions: Next.js 15 and 16.

Outside Vercel, run `next start` behind a reverse proxy or a CDN that respects the `Cache-Control` headers emitted by Next.js. `assetPrefix` in `next.config.ts` (or `next.config.js`) lets you serve `/_next/static` from another domain, at the cost of an extra connection.

## Common mistakes

- **Believing a CDN speeds up everything**: without HTML caching, the page itself still goes back to the origin.
- **Hosting far from your audience** to save a few euros.
- **Splitting the application and the database** across two regions.
- **Leaving Cloudflare in “Flexible” SSL mode**.
- **Enabling HTTP/3 without opening UDP port 443**: browsers fall back to HTTP/2 without reporting anything.
- **Spreading files across several subdomains**: a practice inherited from HTTP/1.1, counterproductive with HTTP/2.
- **Letting the CDN firewall block crawlers** or an entire country: Googlebot crawls mostly from the United States.
- **Leaving the origin reachable without protection**: restrict direct access to the CDN's addresses when possible.

## Frequently asked questions

### Does a CDN improve SEO?

Not directly: having a CDN is not a ranking factor. It reduces TTFB and speeds up the delivery of images, CSS and fonts, which benefits LCP and Core Web Vitals. It also absorbs traffic peaks and limits the 5xx errors seen by crawlers. Poorly configured, however, its firewall can block Googlebot: check this after setting it up.

### Does server location matter to Google?

Very little as a signal: it is at best a weak geotargeting signal. It matters mainly for speed. Each round trip between the visitor and a distant server takes time, and opening a secure connection requires several of them. Host the origin close to most of your visitors, and the database in the same data center as the application.

### Should I enable HTTP/3?

Yes, when your server or CDN offers it. HTTP/3 opens the connection faster and copes better with the packet loss of mobile networks. It relies on QUIC, and therefore on UDP: open port 443 for UDP on the firewall, otherwise browsers fall back to HTTP/2 without reporting anything. Apache does not support it: in that case, put a CDN or a proxy in front of the site.

### Is a CDN enough to speed up a slow site?

No. Without HTML caching, every page still goes all the way back to the origin: the CDN speeds up static files and shortens the connection, but page generation time stays the same. Configure caching for public HTML, fix an overloaded or undersized server, and do not stack a URL-rewriting CDN and a proxy CDN on the same site.

## Resources

- [web.dev: Content delivery networks (CDNs)](https://web.dev/articles/content-delivery-networks)
- [Apache: mod_http2](https://httpd.apache.org/docs/2.4/mod/mod_http2.html)
- [Nginx: HTTP/3 module](https://nginx.org/en/docs/http/ngx_http_v3_module.html)
- [Cloudflare: Getting started](https://developers.cloudflare.com/fundamentals/) and [HTTP/3](https://developers.cloudflare.com/speed/optimization/protocol/http3/)
- [Amazon CloudFront: Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html)
- [Google Cloud: Cloud CDN overview](https://cloud.google.com/cdn/docs/overview)
- [Azure Front Door: documentation](https://learn.microsoft.com/en-us/azure/frontdoor/)
- [Vercel: Function regions](https://vercel.com/docs/functions/configuring-functions/region)
- [Google Search Central: Managing multi-regional and multilingual sites](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)

Next steps: [configure browser and server caching](https://checklist-seo-geo.com/en/performance-core-web-vitals/configure-browser-server-caching), [target TTFB ≤ 800 ms as a benchmark](https://checklist-seo-geo.com/en/performance-core-web-vitals/target-ttfb-800-ms-as-benchmark) and [check CDN, WAF and anti-bot protection](https://checklist-seo-geo.com/en/crawling/check-cdn-waf-anti-bot-protection).
