Skip to main content

Confirm

Are you sure?

Performance · Checked once per domain

CDN usage for static contentWhat it checks and how to fix it

What it checks

Looks for a CDN in the page's response headers (cf-ray, x-amz-cf-id, x-served-by, x-vercel-id, x-netlify-cache, or a Server header naming Cloudflare, CloudFront, Akamai, Fastly or Varnish) and in the hostnames of its scripts, stylesheets and images; when neither shows one, it checks the headers of up to three external assets. Passes when any CDN is found and warns when none is.

Why it matters

Without a CDN every visitor fetches every file from your origin, wherever they are, so someone on the other side of the world pays a full intercontinental round trip for each request. A CDN serves cached copies from an edge close to the visitor, cuts latency and origin load, and absorbs traffic spikes that would otherwise take the site down.

How to fix it

Put the site, or at least its static assets, behind a CDN.

Cloudflare: add the domain to Cloudflare, switch the nameservers to the ones it gives you and make sure the DNS records for the site are proxied (orange cloud). Static assets are cached at the edge by default.

Amazon CloudFront / Fastly / Bunny: create a distribution whose origin is your server, then point a hostname such as cdn.example.com at it with a CNAME.

Rails: serve assets from the CDN hostname.

# config/environments/production.rb
config.asset_host = "https://cdn.example.com"

nginx behind a CDN: send long-lived caching headers so the edge can keep the files.

location /assets/ {
  add_header Cache-Control "public, max-age=31536000, immutable";
}

Monitor this automatically

Full Stack Audit runs this check and 126 others on your site on a schedule, and emails you when one that passed starts failing.

More Performance checks