Page Caching and CDN Tools & Commands: Ready to Use

The key to cache troubleshooting is “looking at the evidence”: whether the response header has cache indicators, which layer was hit, what the TTFB is, and whet…

Insights:Page Caching and CDN Tools & Commands: Ready to Use

1. curl: Check Response Headers and TTFB

curl -I https://example.com/page
curl -o /dev/null -s -w \
  "dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} ttfb=%{time_starttransfer} total=%{time_total}\n" \
  https://example.com/page

Key things to check:

  • cache-control, age, etag, last-modified
  • x-cache, via, server and other CDN identifiers
  • TTFB and total response time

2. dig: Check DNS Resolution and CDN CNAME

dig +short A example.com
dig +short CNAME www.example.com
dig +short NS example.com

Verify if the domain points to a CDN and whether the authoritative DNS matches your current provider.

3. openssl: Check SSL Certificate

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates -subject

Check the certificate expiry date and whether the domain matches. An expired certificate will make the entire site inaccessible.

4. Browser DevTools

  • In the Network panel, look for from cache, from disk cache, and from CDN.
  • Inspect response headers and request timing.
  • Check for mixed content.
  • Evaluate first-screen resource priorities.

5. CDN Console

  • Cache hit rate and origin pull ratio.
  • Purge records.
  • Origin 5xx errors.
  • Node status and traffic.

Console data and curl results must align; don't rely on just one source.

Recommended Troubleshooting Order

  1. curl -I to check cache headers and CDN identifiers.
  2. dig to verify DNS resolution points to the CDN.
  3. Compare content returned by origin vs. CDN.
  4. Check TTFB and origin pulls.
  5. Review certificates and status codes.
  6. Change one configuration at a time, then retest the same URL.

What Not to Do

  • Don't directly compare results from different regions or cache states.
  • Don't focus solely on CDN cache hit rate.
  • Don't ignore response headers.
  • Don't batch-change rules without a rollback plan.

Tools provide evidence, not conclusions. Identify which layer the issue lies in before making changes.

Related reading: