How to Reduce TTFB: 12 Proven Ways to Improve Page Load Times

a bad performance website

A slow Time to First Byte (TTFB) frustrates users before they even see your content. According to Google’s Web Vitals guidelines, a good TTFB is 0.8 seconds or less, while anything over 1.8 seconds needs improvement. If your TTFB is lagging, you’re losing visitors and hurting your search rankings.

This guide covers everything you need to know about TTFB—what it is, how to measure it accurately, and 12 proven techniques to reduce it. Whether you’re running WordPress, a custom application, or an e-commerce store, these optimisations will help your pages load faster.

Quick Wins: Check These First

Before diving into complex optimisations, try these quick fixes that often provide immediate TTFB improvements:

  • Enable page caching – Install a caching plugin (WordPress) or enable server-level caching
  • Check for redirect chains – Each redirect adds latency; audit with Screaming Frog or Redirect Checker
  • Update PHP version – PHP 8.x is significantly faster than older versions
  • Disable unnecessary plugins – Each plugin can add database queries and processing time
  • Switch to a faster DNS – Use Cloudflare DNS (1.1.1.1) or Google DNS (8.8.8.8)

What is Time to First Byte (TTFB)?

Time to First Byte (TTFB) measures how long it takes from when a browser requests a page until it receives the first byte of data from the server. It’s the foundation of page load speed—everything else depends on getting that first byte quickly.

TTFB includes several phases:

  • DNS lookup – Translating the domain name to an IP address
  • TCP connection – Establishing a connection to the server
  • TLS handshake – Negotiating secure HTTPS connection (if applicable)
  • Server processing – Running code, querying databases, building the response
  • Network latency – Physical distance between user and server

TTFB Benchmarks: What’s Good?

Google provides clear benchmarks for TTFB performance:

TTFBRatingAction
0.8 seconds or lessGoodMaintain current performance
0.8 – 1.8 secondsNeeds ImprovementImplement optimisations below
Over 1.8 secondsPoorUrgent attention required

How TTFB Affects SEO and Core Web Vitals

While TTFB isn’t technically a Core Web Vital, it directly impacts metrics that are:

  • Largest Contentful Paint (LCP) – Your main content can’t render until the HTML arrives. A slow TTFB guarantees a slow LCP.
  • First Input Delay (FID) / Interaction to Next Paint (INP) – Slow server response means delayed JavaScript execution, affecting interactivity.
  • Cumulative Layout Shift (CLS) – Delayed resources can cause late-loading elements that shift content.

Search engines also consider TTFB when crawling your site. Google’s crawlers have time budgets—a slow TTFB means fewer pages get crawled and indexed during each visit. For large sites, this can significantly impact SEO visibility.

How to Measure TTFB Accurately

You need to measure TTFB from multiple locations and using both synthetic and real user data for accurate insights.

Synthetic Testing Tools

These tools test your site from controlled environments:

Chrome DevTools – Open DevTools (F12), go to the Network tab, refresh the page, and click on the main HTML document. The “Waiting (TTFB)” value shows your TTFB.

WebPageTest – Test from multiple global locations and connection speeds. Look at the waterfall chart for detailed TTFB breakdown including DNS, Connect, SSL, and Wait times.

GTmetrix – Provides TTFB alongside other performance metrics. Useful for tracking improvements over time with their monitoring feature.

Google PageSpeed Insights – Shows both lab data and real-user field data from Chrome User Experience Report.

Real User Monitoring (RUM)

Synthetic tests only show you one perspective. Real User Monitoring captures TTFB from actual visitors across different devices, networks, and locations.

  • Google Search Console – Core Web Vitals report shows real-user performance data
  • Chrome User Experience Report (CrUX) – Free public dataset of real Chrome user metrics
  • Dedicated RUM tools – Services like SpeedCurve, DebugBear, or New Relic provide detailed RUM analytics

Measuring with JavaScript

Use the Navigation Timing API for programmatic TTFB measurement:

const navigationEntry = performance.getEntriesByType('navigation')[0];
const ttfb = navigationEntry.responseStart - navigationEntry.requestStart;
console.log(`TTFB: ${ttfb}ms`);

12 Ways to Reduce TTFB

1. Use Fast Web Hosting

Your hosting provider is the biggest factor in TTFB. Budget shared hosting typically produces TTFB of 500ms–2000ms, while quality managed hosting achieves 50ms–200ms.

When choosing hosting:

  • Server location – Choose data centres close to your primary audience
  • Server resources – Sufficient CPU, RAM, and SSD storage for your traffic
  • Hosting type – VPS or dedicated hosting outperforms shared hosting
  • Managed WordPress hosts – Kinsta, WP Engine, and Cloudways are optimised for WordPress performance

2. Implement a CDN

A Content Delivery Network caches your content on servers worldwide, serving visitors from the nearest location. This dramatically reduces network latency.

Popular CDN options:

  • Cloudflare – Free tier available, excellent global coverage
  • Fastly – Premium option with edge computing capabilities
  • AWS CloudFront – Integrates well with AWS infrastructure
  • Bunny CDN – Cost-effective with good performance

For maximum TTFB reduction, enable full page caching on your CDN (not just static assets). This is especially effective for static websites but can also work for dynamic sites with proper cache rules.

3. Enable Server-Level Caching

Caching stores pre-generated responses so your server doesn’t rebuild pages for every request. This is often the single biggest TTFB improvement.

Types of caching:

  • Page caching – Stores complete HTML pages
  • Object caching – Stores database query results (Redis, Memcached)
  • Opcode caching – Stores compiled PHP code (OPcache)
  • Browser caching – Instructs browsers to store files locally

WordPress caching plugins:

4. Upgrade to a Premium DNS Provider

DNS resolution is the first step in loading your site. Slow DNS adds latency before your server even receives the request.

Many domain registrars provide basic DNS that can add 50–150ms to TTFB. Premium DNS providers like Cloudflare, AWS Route 53, or Google Cloud DNS typically resolve in 10–30ms.

You can use a premium DNS with any hosting provider—they work independently.

5. Optimise Your Database

Database queries are often the slowest part of generating a page. As your site grows, database bloat accumulates.

For WordPress sites:

  • Delete old post revisions (keep only 2–3 most recent)
  • Remove spam and trashed comments
  • Clean up expired transients
  • Delete orphaned post meta data
  • Optimise database tables regularly

Plugins like WP-Optimize automate these tasks. For persistent object caching, use Redis or Memcached if your host supports them.

6. Enable HTTP/2 or HTTP/3

HTTP/2 and HTTP/3 are faster protocols that reduce connection overhead:

  • HTTP/2 – Multiplexing allows multiple requests over one connection, reducing latency
  • HTTP/3 (QUIC) – Further reduces connection setup time, especially beneficial on mobile networks

Most modern hosts support HTTP/2 by default. HTTP/3 is available through Cloudflare, Fastly, and some managed hosts. Check your site at http3check.net.

7. Use Early Hints (103 Response)

Early Hints is a newer HTTP feature that lets your server tell the browser what resources to start loading before the main response is ready. This effectively parallelises work that was previously sequential.

When enabled, your server sends a 103 response with preload hints while still generating the full page. The browser starts fetching CSS, fonts, and critical JavaScript immediately.

Cloudflare offers one-click Early Hints. For self-hosted sites, configure your web server to send 103 responses.

8. Enable Gzip or Brotli Compression

Compression reduces the size of your HTML, CSS, and JavaScript files, meaning less data to transfer.

  • Gzip – Universal support, typically achieves 70–90% compression
  • Brotli – 15–25% better compression than Gzip, supported by modern browsers

Most servers and CDNs enable compression by default. Verify at giftofspeed.com/gzip-test.

9. Update PHP to the Latest Version

PHP 8.x is significantly faster than older versions. According to benchmarks, PHP 8.2 handles nearly twice as many requests per second as PHP 7.4.

Check your PHP version in WordPress under Tools → Site Health → Info → Server. Update through your hosting control panel or contact your host.

Before upgrading, ensure your plugins and theme are compatible with the new PHP version.

10. Reduce Redirect Chains

Each redirect adds a full round-trip to TTFB. Common redirect issues:

  • HTTP to HTTPS redirect – Necessary but ensure it’s server-level, not plugin-based
  • www to non-www (or vice versa) – Pick one and redirect the other at server level
  • Trailing slash inconsistency – Be consistent across your site
  • Marketing redirects – Avoid chains like short URL → tracking URL → final page

Use tools like httpstatus.io to check for redirect chains.

11. Optimise Server Configuration

Server-level optimisations can significantly impact TTFB:

For Nginx:

# Enable FastCGI caching
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

# Enable connection keep-alive
keepalive_timeout 65;
keepalive_requests 100;

For Apache:

# Enable keep-alive
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

# Enable mod_deflate for compression
AddOutputFilterByType DEFLATE text/html text/css application/javascript

12. Use Preconnect and DNS Prefetch

Help browsers establish connections to important third-party domains early:

<!-- DNS prefetch for domains you'll connect to -->
<link rel="dns-prefetch" href="//fonts.googleapis.com">

<!-- Preconnect for critical third-party resources -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

Use preconnect sparingly—only for resources loaded early and on most pages. Too many preconnects can actually hurt performance.

Troubleshooting Common TTFB Issues

TTFB is Fast Locally But Slow for Visitors

This usually indicates a geographic distance problem. Solutions:

  • Implement a CDN
  • Choose hosting with servers closer to your audience
  • Enable full page caching at the CDN edge

TTFB Varies Wildly Between Requests

Inconsistent TTFB often means:

  • Cache misses – First request after cache expires is slow, subsequent requests are fast
  • Database lock contention – Concurrent requests waiting for database access
  • Shared hosting resource limits – Other sites on the server affecting performance

Caching is Enabled But TTFB is Still Slow

Common causes:

  • Pages excluded from cache – Logged-in users, cart pages, or query strings bypass cache
  • Cache warming not configured – Cache expires and first visitor gets a slow response
  • Plugin conflicts – Some plugins disable caching for certain pages

High TTFB Only on Specific Pages

If certain pages are slow:

  • Complex database queries – Check if the page runs expensive queries (use Query Monitor plugin)
  • External API calls – Page waiting for third-party services
  • Large page builders – Some builders generate heavy server-side processing

Monitoring TTFB Over Time

TTFB can degrade gradually as your site grows. Set up ongoing monitoring:

  • Google Search Console – Check Core Web Vitals report monthly
  • Uptime monitoring – Services like Uptime Robot or Pingdom track response times
  • Synthetic monitoring – Schedule regular tests with GTmetrix or WebPageTest
  • RUM dashboards – Track real user TTFB percentiles over time

Conclusion

Reducing TTFB is one of the most impactful performance improvements you can make. Start with the quick wins—caching, PHP updates, and redirect cleanup—then work through server-level optimisations as needed.

Remember that TTFB affects everything else on your page. A slow TTFB makes it impossible to achieve good Core Web Vitals scores, regardless of how optimised your frontend code is. Aim for under 800ms, and you’ll see improvements across all your performance metrics.

Need help optimising your site’s performance? Contact Kahunam for a comprehensive performance audit.

Is your site as fast as it could be?

Speed impacts SEO, conversions, and user experience. Let's audit your site and create a performance improvement plan.

Book a Discovery Call