TTFB SEO Guide: How to Reduce Time to First Byte
What TTFB Measures
Time to First Byte (TTFB) measures how long it takes for the browser to receive the first byte of a response after requesting a page. It is not a Core Web Vital, but it strongly influences performance metrics such as Largest Contentful Paint (LCP). If the server is slow to respond, everything else starts late.
For SEO, TTFB matters because users and crawlers both depend on reliable server response. Slow infrastructure can reduce crawl efficiency, delay rendering, and make every page-level optimisation work harder. The wider Core Web Vitals framework is covered in our pillar guide.
Where TTFB Time Goes
TTFB is not one single thing. It is the combined result of network routing, server processing, application logic, database work, caching, and hosting quality.
| Layer | Common Problem | Practical Fix |
|---|---|---|
| DNS and connection | Slow lookup or TLS negotiation | Use reliable DNS, HTTP/2 or HTTP/3, keep-alive |
| CDN edge | No cache hit or distant edge | Configure CDN caching and regional coverage |
| Web server | Slow PHP/app workers | Tune workers, remove bottlenecks, cache HTML |
| Database | Slow queries or missing indexes | Add indexes, optimise queries, cache results |
| Application | Heavy plugins or dynamic rendering | Remove overhead and pre-render where possible |
Before changing code, identify whether the delay is at the edge, server, application, or database layer. Guessing is expensive. Measuring is cheaper.
The Fastest TTFB Wins
The fastest wins usually come from reducing work per request. If every page view triggers dynamic generation, database queries, API calls, and template processing, TTFB will suffer under load.
Prioritise these fixes:
- Cache full HTML for pages that do not need to be fully dynamic.
- Use CDN edge caching for public content.
- Remove unnecessary backend plugins or middleware.
- Optimise database indexes and slow queries.
- Avoid calling external APIs during page generation.
- Compress responses with Brotli or Gzip.
- Use static generation for stable content where possible.
- Monitor origin response time separately from CDN response time.
For a broader infrastructure view, read our guide to optimizing server resources for SEO.
How TTFB Affects LCP and Crawl Budget
TTFB creates the starting line for LCP. If the first byte arrives late, the browser cannot parse HTML, discover critical resources, or start rendering the main content. That is why LCP fixes often fail when the server is still slow.
TTFB also affects crawl behaviour. Search engines do not want to overload slow hosts. If response times spike, crawling can become more cautious. On large sites, this can slow discovery and delay updates.
The relationship is simple:
- Slow TTFB delays page rendering.
- Delayed rendering hurts LCP.
- Slow server response can reduce crawl efficiency.
- Poor crawl efficiency can slow discovery of new or updated URLs.
For crawl-specific detail, see our crawl budget optimisation guide.
How to Measure TTFB Correctly
TTFB needs to be measured from more than one location and under more than one condition. A fast result from your own laptop does not prove the site is fast for users or bots elsewhere.
Use this workflow:
- Test from multiple regions.
- Compare cached and uncached responses.
- Separate CDN TTFB from origin TTFB.
- Review server logs for slow responses.
- Check whether bot requests are slower than user requests.
- Monitor after deployments and traffic spikes.
Log files are especially useful because they show how bots actually experience your server. For that workflow, read our guide to advanced log file analysis.
Final TTFB Checklist
Use this checklist when TTFB is holding back performance:
- Confirm whether the issue is origin, CDN, or network latency.
- Cache full HTML where possible.
- Remove backend work from public page requests.
- Optimise database queries and indexes.
- Avoid external API calls during rendering.
- Use edge caching for global audiences.
- Monitor bot response times in server logs.
- Re-test LCP after reducing TTFB.