Skip to content
All articles

What is Time to First Byte (TTFB), and why does it matter for SEO?

guide // , 5 min read, by Darthwares

Time to First Byte (TTFB) is a performance metric measuring the time from when a browser requests a page until it receives the first byte of the response. It matters for SEO because a low TTFB allows browsers to load document markup early, helping sites satisfy Google page experience expectations. TTFB includes network steps like DNS lookups, TCP handshakes, and server response times. Good TTFB values are 0.8 seconds or less, while values above 1.8 seconds are considered poor.

A flow diagram showing a browser requesting an HTML page, DNS lookup, server processing, and the receipt of the first byte of response.
On this page // 6 sections
  1. 01What is Time to First Byte (TTFB)?
  2. 02How does TTFB relate to Core Web Vitals and SEO?
  3. 03What factors influence TTFB and how can you optimize it?
  4. 04How do you measure TTFB in tools and APIs?
  5. 05How do you diagnose high TTFB on a web page?
  6. 06Common questions

The short version

  • TTFB measures the duration between a request start and the arrival of the first response byte in milliseconds.
  • Good TTFB values are 0.8 seconds or less, while poor values exceed 1.8 seconds.
  • While not a direct Core Web Vitals metric, TTFB precedes all downstream loading metrics like Largest Contentful Paint.
  • Server hosting choices, redirect reduction, streaming markup, and service workers can lower TTFB.
  • You can measure TTFB using PageSpeed Insights, Chrome DevTools, or the browser Navigation Timing API.

What is Time to First Byte (TTFB)?

Time to First Byte is a metric that measures the time between starting navigation to a page and when the first byte of a response begins to arrive. MDN Web Docs defines TTFB as the duration in milliseconds between the browser requesting a page and receiving its first byte of information from the server.

This metric captures the full round-trip delay involved in initializing a connection. MDN Web Docs notes that TTFB includes DNS lookup time, establishing a connection using a TCP handshake, and negotiating a TLS handshake for HTTPS requests.

How does TTFB relate to Core Web Vitals and SEO?

TTFB is not a direct Core Web Vitals metric, but it acts as a foundational requirement for overall loading speed. According to web.dev documentation, TTFB precedes every other meaningful loading performance metric for HTML document navigation requests. A low TTFB is crucial because it delivers markup to the client as early as possible.

Google Search Central states that Core Web Vitals measure real-world user experience for loading performance, interactivity, and visual stability, aligning with what core ranking systems reward. For instance, achieving Largest Contentful Paint (LCP) within 2.5 seconds requires a fast initial response. Web.dev guidance indicates that good TTFB values are 0.8 seconds or less, while poor values exceed 1.8 seconds.

Because TTFB is not a Core Web Vitals metric, meeting the 0.8 second threshold is not strictly mandatory if it does not impede your ability to score well on main performance metrics. However, Google PageSpeed Insights reports experiences for TTFB alongside Core Web Vitals like LCP and Cumulative Layout Shift.

What factors influence TTFB and how can you optimize it?

Web hosting infrastructure is the primary factor influencing server response times and initial latency. Web.dev documentation highlights that hosting should be evaluated before considering any other performance optimization approaches.

Redirects are another common contributor to a high TTFB. Eliminating redirects under your direct control helps achieve a good TTFB by reducing unnecessary network hops before the server sends HTML data.

Backend rendering and delivery techniques also play a significant role. Browsers are optimized to process markup efficiently when it is streamed in chunks as it arrives. Servers can also send a 103 Early Hints response header to inform the browser while backend systems assemble the document. Furthermore, using the Service Worker API can positively impact TTFB for documents and loaded resources.

How do you measure TTFB in tools and APIs?

You can measure navigation TTFB in client applications using browser APIs or dedicated testing tools. Web.dev explains that the Navigation Timing API allows measuring TTFB for navigation requests directly inside the browser.

MDN Web Docs notes that the PerformanceNavigationTiming interface provides properties for document navigation events, including the responseStart attribute used to measure TTFB. This interface inherits from PerformanceResourceTiming and PerformanceEntry, and only one PerformanceNavigationTiming object exists in the performance timeline for the current document.

For lab and field diagnostics, Google PageSpeed Insights analyzes web pages using Chrome User Experience Report data and Lighthouse simulations. Developers can also open Chrome DevTools, where all network requests are logged in the Network panel Requests table while DevTools remains open.

How do you diagnose high TTFB on a web page?

Diagnosing TTFB issues involves verifying network timings, analyzing request logs, and reviewing server response configurations. Following a structured procedure helps identify latency bottlenecks.

  1. 01Open Chrome DevTools and inspect the Network panel Requests table while reloading the page to record initial navigation request timing.
  2. 02Run the page URL through Google PageSpeed Insights to examine real-world Chrome User Experience Report field data alongside Lighthouse lab diagnostics.
  3. 03Check for unnecessary internal URL redirects during navigation and eliminate any redirect chains under your control.
  4. 04Access the responseStart attribute of the PerformanceNavigationTiming interface via the Navigation Timing API to measure response start times programmatically.
Mapping symptoms to TTFB checks and fixes
SymptomPossible CauseDiagnostic Check or Fix
TTFB exceeds 1.8 seconds in lab auditsSlow hosting or server setupEvaluate web hosting infrastructure before pursuing front-end optimizations.
Multiple network hops before initial HTML arrivalUnnecessary HTTP redirectsEliminate controlled redirects to reduce navigation request delays.
Inconsistent response start times in real-world user metricsBackend latency during document assemblyMonitor the responseStart attribute using the PerformanceNavigationTiming interface.

Common questions

What is considered a good TTFB value?

According to web.dev, good TTFB values are 0.8 seconds or less. A TTFB value greater than 1.8 seconds is considered poor.

Is TTFB a Core Web Vitals metric?

No, TTFB is not a Core Web Vitals metric. However, web.dev explains that TTFB precedes all other document loading metrics, and Google PageSpeed Insights reports TTFB experiences.

What does the 103 Early Hints header do for TTFB?

The 103 Early Hints header is an early response code sent by the server to the browser while the backend is busy preparing the markup.

How can you programmatically measure TTFB in the browser?

You can measure TTFB using the responseStart attribute of the PerformanceNavigationTiming interface provided by the Navigation Timing API.

Primary sources and further reading

This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.