tech
How to fix: Server response time (TTFB) <=800ms
Why this matters
Time to First Byte is when the server delivers the first byte of HTML to the browser. <=800ms is Google's Good threshold; >1800ms is Poor. TTFB is the foundation of every other performance metric — a slow server negates frontend optimisations.
Background
TTFB is when the server delivers the first byte of HTML. <=800ms = Good; >1.8s = Poor. TTFB is the foundation of every other performance metric — a slow server negates every frontend optimisation.
References
web.dev/ttfb · Core Web Vitals supplementary metric
How to fix
Code snippet for each stack we cover. Pick the one matching your server / framework.
nginx
Enable proxy_cache for cacheable responses. Use `worker_processes auto` + tune `worker_connections`. HTTP/2 + keepalive.
apache
mod_cache + mod_disk_cache. Tune MPM worker config.
cloudflare
Page Rules → Cache Everything for cacheable pages. APO on the Pro plan handles WordPress edge caching.
wordpress
Object cache (Redis Object Cache plugin). Page cache (WP Rocket / W3 Total Cache). Move heavy plugins (slow DB queries, external API calls) off the critical render path.
flask
Profile slow endpoints with `werkzeug.contrib.profiler`. Cache DB queries with Flask-Caching. Move slow work to Celery background tasks.
express
Profile with `clinic.js doctor`. Use Redis for session + query caching.
rails
Rails.cache.fetch around expensive queries. New Relic / Skylight for endpoint profiling.
Verify it's working
https://pagespeed.web.dev/ TTFB metric, OR `curl -w '%{time_starttransfer}' -o /dev/null -s https://your-site/` — should be <0.8s.
Want to know if your site has this issue?
Run a free 53-check audit — security, GDPR, NIS2, and technical SEO.
Audit my site →