Time to first byte: why server speed matters

Time to first byte (TTFB) is how long the browser waits before the server starts sending the page. Everything else waits for it.

What causes slow TTFB

  • Slow hosting or an overloaded server.
  • Heavy database queries on every page view.
  • No page caching.
  • The server being far from your visitors.

How to improve it

  • Turn on page or full-site caching.
  • Use a CDN close to your audience.
  • Upgrade hosting or PHP version.
  • Optimise slow database queries.

What is a good TTFB?

Under about 0.8 seconds is a reasonable target for real visitors, and much faster is possible with caching. If your TTFB is several seconds, every other speed improvement is fighting an uphill battle.

Where time goes

  • DNS lookup: finding your server's address.
  • Connection and TLS: setting up the secure connection.
  • Server processing: running your code and database queries.

A slow DNS provider or a server far from your visitors adds time before your code even runs.

Measure from more than one place

TTFB from your office may be fast while visitors in other regions wait longer. A CDN with locations near your audience helps.

Watch it over time

Plugins, traffic growth and database size can slowly make a site slower. Check TTFB after big changes and every few months.

Measure it

The TTFB checker measures it for any page. Site audits flag pages whose first byte takes more than 1.5 seconds as slow pages.

0 comments

Leave a comment

Not shown publicly.