Time to First Byte (TTFB) is the quiet ceiling on every other performance metric your site reports. No browser can start parsing HTML, downloading stylesheets, executing JavaScript, or painting your Largest Contentful Paint (LCP) hero until byte #1 of the document arrives.

Google's Core Web Vitals documentation sets three clear bands for TTFB:

  • Good: <= 800 ms
  • Needs improvement: 801–1,800 ms
  • Poor: > 1,800 ms

Yet slow TTFB rarely triggers a traditional uptime alarm. The site still returns HTTP 200, your uptime dashboard stays green, and mobile visitors quietly abandon checkout because every anonymous visit waits 1.4 seconds for PHP, database queries, or an avoidable redirect chain.

Here is how to split one TTFB number into its five real components, read cache headers to prove whether the edge or the origin is at fault, and apply copy-paste fixes across Cloudflare, Nginx, WordPress, and Next.js.

1. Split TTFB Into Its Five Real Phases

When a browser opens a URL, measured TTFB is the sum of five sequential steps:

  1. Redirect hops: If http://example.com redirects to https://example.com, which then redirects to https://www.example.com/, visitors pay two extra network round trips before the final HTML request even starts. Collapsing canonical redirects into a single 301 hop saves 150–400 ms on mobile connections. (You can trace every hop in one shot with our free HTTP Redirect Chain Checker.)
  2. DNS lookup: Uncached or non-anycast authoritative nameservers routinely add 50–250 ms on cold visits. Anycast DNS (Cloudflare, Route 53, Bunny DNS, Hetzner DNS) usually answers in 10–35 ms across Europe.
  3. TCP connect + TLS handshake: Geographic distance between visitor and server drives RTT. TLS 1.3 and edge termination cut handshake round trips dramatically.
  4. Origin wait (backend execution): Time between your web server receiving the HTTP request and flushing the first byte of HTML. On WordPress, WooCommerce, Laravel, or server-rendered Next.js pages that miss cache, origin wait routinely accounts for 70–90% of slow TTFB.
  5. Edge / reverse-proxy cache lookup: Serving anonymous HTML from RAM (Cloudflare edge, Nginx FastCGI cache, Varnish, or LiteSpeed) reduces origin wait to 0 ms and pulls TTFB into the 40–180 ms range.

2. Check Two Header Groups Before Touching Application Code

Before profiling SQL queries or upgrading your VPS, inspect the live response headers with our free, zero-storage TTFB & Server Response Time Checker:

  • Edge / proxy cache status: CF-Cache-Status, X-Cache, X-Vercel-Cache, X-LiteSpeed-Cache, or X-FastCGI-Cache. Cloudflare marks HTML as DYNAMIC by default unless you configure an explicit Cache Rule or APO.
  • Cache-Control and Age: If a public marketing or product page sends Cache-Control: no-store, no-cache, must-revalidate, max-age=0, every CDN and proxy is legally required to bypass cache and forward every visitor straight to your origin database.

3. Copy-Paste Fixes by Stack

Cloudflare Cache Rule (Cache Anonymous HTML, Bypass Cart & Admin)

When incoming requests match: (not starts_with(http.request.uri.path, "/wp-admin")) and (not starts_with(http.request.uri.path, "/cart")) and (not starts_with(http.request.uri.path, "/checkout")) and (not http.cookie contains "wordpress_logged_in_") and (not http.cookie contains "woocommerce_items_in_cart") Then: Cache eligibility: Eligible for cache Edge TTL: Override origin -> 1 hour 

Nginx FastCGI Micro-Caching (PHP-FPM / WordPress / Laravel)

Even a 60–300 second micro-cache for anonymous GET requests shields PHP-FPM from bot spikes and drops p95 TTFB sharply:

fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=PAGE:100m inactive=60m use_temp_path=off; fastcgi_cache_key "$scheme$request_method$host$request_uri"; gzip on; gzip_comp_level 5; gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml; add_header X-FastCGI-Cache $upstream_cache_status always; 

WordPress & WooCommerce Origin Hygiene

Uncached requests (search, cart, checkout, logged-in admins) still hit PHP. Keep origin wait below 400 ms by:

  • Enabling persistent Redis object caching for wp_options and WooCommerce queries.
  • Auditing bloated wp_options rows (autoload = 'yes') exceeding 1 MB left behind by removed plugins.
  • Disabling visitor-triggered wp-cron.php and moving scheduled jobs to a real system crontab watched by a cron heartbeat check.

Next.js & Modern SSR Routes

Avoid calling dynamic cookies() or headers() inside shared root layouts on public marketing or catalog routes (which silently opts the whole subtree out of static/ISR caching), and set Cache-Control: public, s-maxage=300, stale-while-revalidate=3600 on cacheable responses.

4. Test Your Live TTFB & Auto-Generate Stack Configs (No Account, Nothing Stored)

We shipped a free, zero-storage TTFB & Server Response Time Checker that runs one live measurement from our EU probe server, splits DNS / TCP / TLS / origin wait / TTFB against Google's 800 ms threshold, inspects Cache-Control and CDN cache headers, traces redirect hops, and generates tailored copy-paste speed snippets for Cloudflare, Nginx, Apache/WordPress, and Next.js — with 1-click Print / Save PDF for client audits.

Other zero-storage tools in the same suite (30 tools total, no login required):

If you want continuous p50/p95 TTFB and sustained-slowdown alerts from two EU regions alongside daily external security checks and a hosted 16-tool MCP server, Beamfar includes a permanent 1-site Free plan with no credit card required.

Cyber Monday note (through Dec 1, noon CT): If you manage up to 10 sites and prefer a one-time payment over monthly billing, Beamfar's Solo Lifetime Deal (10 sites, 1-min EU checks, p50/p95 latency tracking, daily security & CISA KEV scans, monthly client PDF reports, hosted MCP server) is 10% off ($62.10 once, 60-day refund window) on AppSumo Black Friday / Cyber Monday.