How to reduce time to first byte (TTFB)
Time to first byte (TTFB) is how long your server takes to start answering a page request. Aim for 0.8 seconds or less, and fix it with page caching, a lighter database and plugin load, newer PHP, a CDN, or better hosting.
TTFB measures the wait between a visitor's browser asking for your page and the first piece of the reply arriving. Nothing can appear on screen before that moment, so a slow TTFB delays everything that follows. The good news is that most slow TTFB on small business sites comes from a handful of fixable causes, and you can check yours for free in a few minutes.
What slow TTFB looks like
Visitors see a blank white page or a spinning tab for a second or more before anything starts to load. Once the page begins, it may then load quickly, which is why owners often miss the problem: the site feels fine on a second visit but sluggish on the first, or sluggish only at busy times.
Google's guidance (on web.dev) treats a TTFB of 0.8 seconds or less as good, and more than 1.8 seconds as poor. Anything in between needs improvement. These are measured on real visitors, so your own fast office connection can hide the problem.
Why it matters
TTFB is not one of the three Core Web Vitals itself, but it comes before them. A slow first byte pushes back your Largest Contentful Paint (LCP), and LCP is a Core Web Vital that Google uses as a ranking signal. If your main image or headline is also loaded late, see lazy-loaded LCP image as a second thing to check.
It also costs you sales and trust. People leave pages that do not respond, especially on mobile connections, and a shop checkout that hesitates feels unreliable. Slow responses can also mean your server is struggling, which leaves less room for traffic spikes.
How to check your site for free
- Open PageSpeed Insights (pagespeed.web.dev), enter your address and run the test. Look for the audit called "Reduce initial server response time" and, if shown, the TTFB figure in the real user data.
- Try WebPageTest (webpagetest.org). It shows a "Time to First Byte" figure and lets you pick a test location close to your customers.
- In Chrome, press F12, open the Network tab, reload, click the first request (your page) and open the Timing section. "Waiting for server response" is your TTFB.
- If you are comfortable with a terminal, this prints the time to first byte in seconds:
curl -o /dev/null -s -w '%{time_starttransfer}' https://example.com/
Run any test three or four times, and test a page you have not just visited. The first request after a quiet period is often slower because the cache is empty, and that is exactly what a new visitor or Googlebot experiences.
How to fix it
Start with the cause that is most common and cheapest to fix, then work down.
- Turn on page caching. Without it, your server rebuilds each page from scratch for every visitor. A cache saves the finished page and serves it instantly. On most content management systems this is a caching plugin or a host feature, usually found under a menu named Performance, Cache or Speed. It depends on your platform.
- Use a current PHP version. If your site runs on PHP (WordPress and WooCommerce do), your hosting control panel usually has a PHP version setting. Newer supported versions are generally faster. Take a backup and test first, because old plugins can break.
- Remove heavy plugins and slow database work. Every active plugin can add work to each request. Deactivate what you do not use. The free Query Monitor plugin for WordPress shows which plugins and database queries take longest.
- Add an object cache if your host offers one. Redis or Memcached keep repeated database answers in memory. This helps most on shops, membership sites and busy blogs.
- Put a CDN in front. A content delivery network such as Cloudflare keeps copies of your pages and files closer to visitors. It helps most when your visitors are far from your server. Caching full HTML pages at the CDN is what actually lowers TTFB, so check that this is switched on, not only image caching.
- Check your hosting. Cheap shared hosting that is overloaded produces slow responses no matter what you tweak. If you have cached, updated PHP and trimmed plugins and the number is still poor, a better plan or a different host is the honest answer.
- Cut redirect chains. Sending visitors from http to https to www to the final page adds a full round trip each time. Link directly to the final address.
Platform specific steps are in our guides for WordPress and WooCommerce. Shops need extra care because cart, checkout and account pages must not be cached the same way as ordinary pages.
If you manage your own server, the equivalent work is in the web server and PHP settings (for example enabling OPcache for PHP, and using FastCGI or proxy caching in nginx). If that sounds unfamiliar, hand this list to your developer or host support.
How to confirm the fix worked
Repeat the same test you used before, from the same location, on the same page, and compare. Test both a freshly cached page and one that has not been visited. Check a few different pages, including the home page, a product or service page and a blog post.
PageSpeed Insights real user data takes time to update, because it reflects the past weeks of visitors. Do not expect the field figure to change overnight. Your own lab tests will show the improvement straight away.
How to stop it coming back
TTFB tends to creep up as sites grow: more plugins, a bigger database, more traffic and a theme update that adds work. A few habits keep it in check.
- Test TTFB again after installing a plugin, changing theme or adding a new feature.
- Clear out old data such as spam comments, expired sessions and unused revisions where your platform allows it, with a backup first.
- Keep PHP, your platform and plugins updated, with a backup first.
- Revisit your hosting plan if traffic has grown noticeably.
SiteMonday checks this in week 4, the speed and Core Web Vitals week, and the written report and ranked fix list show where server response sits among your other speed problems. It finds and explains the issue, and the fix itself is for you or your developer to carry out.
Step by step for your platform
- Slow server response time (TTFB) on WordPress
- Slow server response time (TTFB) on WooCommerce
- Slow server response time (TTFB) on Nginx
Questions
What is a good TTFB?
Google treats 0.8 seconds or less as good and more than 1.8 seconds as poor, with the range between needing improvement. Lower is better, especially for visitors on mobile connections.
Is TTFB a Core Web Vital?
No, but it directly affects Largest Contentful Paint, which is a Core Web Vital. A slow first byte delays everything the visitor sees afterwards.
Will a CDN fix a slow TTFB?
Often, if it caches your full HTML pages and your visitors are far from your server. If the page is not cached at the CDN, requests still travel to your slow origin server.
Why is my TTFB fine for me but poor for visitors?
Your browser may be using a cached copy, or you are close to the server. Test from a different location with a page you have not recently opened, and check real user data in PageSpeed Insights.
Do I need to change hosting to reduce TTFB?
Not always. Try page caching, a newer PHP version and fewer plugins first. If the numbers stay poor after that, an overloaded or underpowered host is the likely cause.
Why does TTFB get worse at busy times?
Your server is handling many requests at once and may run out of capacity, especially on shared hosting. Caching reduces the work per visitor, and a larger hosting plan adds capacity.