How to Fix Slow Server Response Time (TTFB)
Your audit flagged a slow Time to First Byte (TTFB), the delay between the browser requesting a page and receiving the first byte of the response. A good TTFB is 800ms or less at the 75th percentile of real users; 800ms to 1,800ms needs improvement, and over 1,800ms is poor. The browser can't start rendering until that first byte arrives, so a slow TTFB directly delays Largest Contentful Paint (LCP), hurts rankings, and slows how fast crawlers (including AI crawlers) can fetch your content. Fix it with server-side page caching, a CDN, faster hosting, database and back-end optimization, and by collapsing redirect chains.
What this means
Time to First Byte (TTFB) measures how long it takes for the browser to receive the very first byte of the response after it sends a request. It's the sum of several sequential steps: DNS lookup, TCP connection, TLS negotiation, the request travelling to your server, the server building the page (running PHP, querying the database, calling APIs), and the response starting its trip back.
Your audit uses two related codes. moderate_response means the response landed in the "needs improvement" band, roughly 800ms to 1,800ms. slow_response means it crossed into "poor" territory, over about 1,800ms, where the server takes well over a second just to start replying, before a single image or script has loaded.
A high TTFB almost always points at the back end, not the front end. Minifying CSS or compressing images won't help, because the browser is still waiting for the server to hand over the HTML. The usual causes are slow or overloaded shared hosting, uncached dynamic pages that rebuild on every request, heavy or unindexed database queries, a missing CDN (so far-away users pay a large network round-trip), slow third-party API calls during page generation, or a redirect chain that adds a full extra request before the real page starts.
TTFB is not itself one of the three Core Web Vitals (LCP, INP, CLS). It's a diagnostic metric. But it's the foundation they build on: it's the first component of LCP, so a slow TTFB caps how good your LCP can ever be.
Why it matters
TTFB sets a hard floor on your loading speed. If the server takes two seconds to send the first byte, your Largest Contentful Paint cannot happen before two seconds, and no amount of front-end optimization can claw that back. LCP is a Core Web Vital and a confirmed ranking signal, so a slow TTFB drags down a metric Google measures on real users through the Chrome UX Report, especially on mobile.
Slow first bytes also hurt conversions. Users on a slow connection stare at a blank screen while the server thinks, and many bounce before anything paints. Googlebot works against a crawl budget too: when your server is consistently slow to respond, it fetches fewer pages per visit, which slows how quickly new and updated content gets indexed.
The answer-engine angle matters here as well. Crawlers behind ChatGPT, Perplexity, and Google's AI Overviews fetch your raw HTML much like Googlebot does, and they generally don't execute your JavaScript or wait around. If your server is slow or times out on the initial response, these bots may fetch fewer pages, retry less, or skip your content, which makes your pages less likely to be cited in AI answers. A fast, reliable TTFB is table stakes for being in the index that both classic search and AI engines draw from.
How to fix it
- 1
Add server-side page caching so pages aren't rebuilt on every request
Full-page caching is the single biggest TTFB win for most dynamic sites. Instead of running PHP and hitting the database on every visit, the server saves the rendered HTML and serves it in milliseconds on later requests. On WordPress, install a caching plugin such as WP Rocket, LiteSpeed Cache (if your host runs LiteSpeed), or W3 Total Cache, and enable page cache plus object cache. On custom stacks, put a reverse-proxy cache like Varnish or Nginx FastCGI cache in front of your app. The goal is for most page views to come from cache rather than being regenerated.
- 2
Put a CDN in front of your site
A CDN like Cloudflare, Fastly, or Bunny serves content from an edge location close to each visitor, cutting the network round-trip that inflates TTFB for far-away users. Modern CDNs can also cache your full HTML at the edge (Cloudflare's 'Cache Everything' rule or APO for WordPress), so the first byte comes from a nearby edge server instead of your origin. This helps global audiences and offloads your origin. Shopify, Wix, and Squarespace already include a CDN, so a stubbornly high TTFB there points to a heavy theme, too many apps, or an overloaded origin rather than a missing CDN.
- 3
Upgrade slow or overloaded hosting
Cheap shared hosting is the most common cause of a poor TTFB. On a crowded shared server your site competes for CPU with hundreds of others, so response times spike unpredictably. If caching and a CDN still don't get you under 800ms, move to better infrastructure: a quality managed WordPress host (Kinsta, WP Engine, Cloudways, SiteGround's higher tiers) or a VPS or cloud instance with dedicated resources. Confirm you're on a current PHP version (PHP 8.1 or newer), since recent PHP releases execute noticeably faster than older ones.
- 4
Optimize the database and slow back-end code
If your server does real work per request, that work has to be fast. Add indexes to columns used in WHERE and JOIN clauses, and find slow queries with the MySQL slow query log or Query Monitor on WordPress. On WordPress specifically, a bloated wp_options table with hundreds of autoloaded options, or too many active plugins each firing queries, will inflate TTFB, so trim autoloaded data and remove unused plugins. Move slow third-party API calls (weather, currency, social feeds) out of the request path by caching their results or fetching them asynchronously, so a slow external service can't hold up your first byte.
- 5
Collapse redirect chains and enable compression
Every redirect is a full extra round-trip before the real page starts loading, so a chain like http to https to www to final URL can add hundreds of milliseconds. Audit your redirects, collapse chains to a single hop, and make sure the canonical URL (https plus your preferred www or non-www) is the one you link to internally. Separately, enable Brotli or Gzip compression at the server or CDN level so the HTML transfers faster once the server starts sending. Most hosts and every major CDN support this with a single toggle.
- 6
Confirm the fix with field data, not one lab test
After making changes, re-run the audit, but also measure across multiple runs and locations, because a single lab test can be misleading. Use WebPageTest or your browser DevTools Network tab (the 'Waiting for server response' timing on the document request) to measure the origin, then watch the Core Web Vitals report in Google Search Console over the following weeks, which reflects real-user data from the Chrome UX Report. Aim for the 75th percentile of your users to see a TTFB at or under 800ms.
Example
# In the http {} context:
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=SITECACHE:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
server {
# ...
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
include fastcgi_params;
fastcgi_cache SITECACHE;
fastcgi_cache_valid 200 60m; # cache 200 responses for 60 min
fastcgi_cache_bypass $skip_cache; # skip for logged-in users, POST, etc.
fastcgi_no_cache $skip_cache;
add_header X-Cache $upstream_cache_status; # HIT/MISS, to verify it works
}
}Nginx FastCGI cache that serves cached HTML on repeat requests, cutting TTFB for dynamic PHP sites like WordPress. The cache_path directive goes in the http {} block; the rest goes in your server block. Reload Nginx after editing.
Platform-specific steps
Install a full-page caching plugin (WP Rocket, or LiteSpeed Cache if your host runs LiteSpeed) and enable page cache plus object cache. Run Query Monitor to find slow queries and heavy plugins, trim autoloaded options in wp_options, and confirm you're on PHP 8.1 or newer. SEO plugins like Yoast or RankMath don't affect TTFB; this is a hosting and caching issue. If you're still over 800ms, pair the plugin with a CDN (Cloudflare APO) or move to a faster managed host.
Shopify runs on a fast, CDN-backed platform, so a high TTFB usually comes from a heavy theme or too many apps injecting server-side logic and Liquid rendering. Audit installed apps and remove ones you don't use, especially any that add server-side rendering or heavy Liquid loops. Simplify bloated collection and product templates. You can't change Shopify's servers, so the lever is reducing the work your theme and apps ask them to do per request.
Both are fully managed with hosting and a CDN built in, so you have limited control over raw server response. Reduce per-page overhead instead: remove unused third-party embeds and marketing scripts, cut the number of elements and heavy blocks on a page, and avoid loading large datasets or many dynamic collection items above the fold. If TTFB is consistently poor, it's largely a platform constraint, so focus on trimming what each page asks the server to build.
Put a CDN (Cloudflare, Fastly) in front and cache HTML at the edge where possible. On Next.js, prefer static generation (SSG) or Incremental Static Regeneration over per-request server rendering for pages that don't need live data, and cache the output of slow data fetches. Add a reverse-proxy cache (Varnish or Nginx FastCGI cache) in front of dynamic routes, index your database queries, and move slow third-party API calls out of the request path so they can't delay the first byte.
Frequently asked
A good Time to First Byte is 800 milliseconds or less, measured at the 75th percentile of your real users (so 75% of visits get the first byte within 800ms). Between 800ms and 1,800ms needs improvement, and anything over 1,800ms is poor. These are the thresholds web.dev and Google's tooling use, though they're a rough guide rather than a hard pass/fail.
Not directly on its own, but it feeds one that is. TTFB is the first component of Largest Contentful Paint (LCP), which is a Core Web Vital and a confirmed ranking signal. A slow TTFB sets a hard floor on your LCP, so improving server response time is one of the most effective ways to improve a metric Google actually ranks on.
Because TTFB is a back-end problem, not a front-end one. It measures how long the server takes to start sending the HTML, before any image, CSS, or script is requested. Image and asset optimization affect later metrics but do nothing for TTFB. Look instead at hosting quality, page caching, database speed, CDN coverage, and redirect chains.
Often, yes, especially for visitors far from your server, since a CDN serves content from a nearby edge location and cuts the network round-trip. If you also cache full HTML at the edge, the first byte comes from the CDN instead of your slow origin. But a CDN can't fix a server that's slow to generate uncached, personalized, or logged-in pages. For those you still need origin-side caching and faster back-end code.
Open your browser DevTools, go to the Network tab, reload the page, and click the main document (HTML) request. The 'Waiting for server response' entry is your TTFB. For a repeatable, location-aware number, use WebPageTest or a tool like DebugBear. For real-user data, check the Core Web Vitals report in Google Search Console, which is powered by the Chrome UX Report.
Does your site have this issue?
Run a free, AI-powered audit and we’ll flag this and 150+ other checks in about a minute. No signup.