Enhancing page speed is essential for both organic rankings and UX. Tools like Google PageSpeed Insights are a useful starting point for diagnosing areas for improvement and gaining top-level recommendations. However, areas such as Time To First Byte (TTFB) require deep consideration of technical factors which go beyond the recommendations often found in popular diagnosis tools.
In this article, inspired by Roxana Stingu’s Women in Tech SEO Festival talk, I provide everything you need to know about improving TTFB, including:
- What TTFB is
- What is a good TTFB
- The connection between TTFB and Core Webs Vital metrics
- How you can measure TTFB
- The different ways to improve TTFB
- Useful Technical terminology to be aware of
What is Time to First Byte (TTFB)?
Time To First Byte (TTFB) is the number of milliseconds (ms) that users initially wait for their web browser to request information (bytes) from a server.
This measurement takes into account Round-Trip Time (RTT) – the time for the browser request to reach the server, for the server to return a response and to deliver it back to the browser.
The longer the TTFB, the slower the page. As a consequence…
- Website content may not rank as well as it could.
- Users will not engage with the content. This will be indicated by a high bounce rate and low average time on page score.
- Users will navigate to alternative websites on the SERPs which are more reliable. This will lead to missing out on conversions to competitors(!)
TTFB is a core web vital metric
On 28th May 2020, Google pre-announced a new ranking algorithm due to go live in 2021 which will focus on page experience. To align with this, the ‘Pagespeed (Experimental)’ tool has now evolved into Core Web Vitals.
Through the Core Web Vitals tool, we are now able to gain further insight into Google’s search signals for page experience through 3 additional metrics which work hand-in-hand with existing signals (shown below).
Google’s search signals for page experience
As TTFB is the initial measurement of how long requests take to come back from the host server, it is a useful metric to analyse alongside First Contentful Paint (FCP). First Contentful Paint (FCP) is the time it takes for the first element to start loading on a page.
By investigating the TTFB and FCP together, it is possible to diagnose where improvements can be made to aid the speed of Largest Contentful Paint (LCP). This is a perceived page loading metric which marks the point in which the main content of a page is likely to have loaded. If this sounds a little complicated, don’t worry! It can seem daunting at first. Let me explain further..
What is a good TTFB?
On Tools for Web Developers, Google has recommended that the TTFB for pages is under 200ms. They have also confirmed via WebDev, that a Lighthouse audit fails when a browser takes more than 600ms to receive a server response, indicating that this is considered a poor TTFB.
Screenshot of GTMetrix’s Waterfall View
Chrome users can also measure TTFB using Chrome DevTools. You can do this by right-clicking ‘Inspect’ on an on-page element, clicking ‘Networking’ on the top bar. and refreshing the page.
Live waterfall loading data via Chrome DevTools when a page is refreshed
There are a number of other tools available to measure TTFB, however, the way that this is calculated and rated will vary from tool to tool. With this in mind, it is useful to explore all TTFB tool options and then use one of these to consistently benchmark TTFB across multiple pages.
How Time To First Byte can be optimised is dependent on a number of factors; from how content is consolidated on-site to the capabilities and limitations of your CMS.
There is no ‘one size fits all’ solution, however, here are a couple of TTFB optimisation methods to consider for your site if you’ve had little success with other optimisations or are faced with optimisation restrictions:
Ensure your CMS plugins are up-to-date
As well as posing a security risk, outdated CMS plugins can also result in a slower TTFB. To ensure that your website is as secure and fast as possible, it is vital that plugins are updated as and when notifications of new releases are received.
Implement Transportation Layer Security (TLS 1.3)
Like Secure Socket Layer (SSL) encryption, TLS provides a secure connection between web browsers and servers. Since its initial roll-out in 1999, TLS has undergone 3 iterations.
Defined in August 2018, TLS 1.3 is quicker than SSL and the previous TLS versions due to the refinement of its handshake (the process to establish a HTTPS connection). TLS 1.3’s handshake only involves a single round-trip rather than three. As a result, websites that have TLS 1.3 encryption experience less latency.
Use a Content Delivery Network (CDN)
You may not realise it but in your everyday browsing activities, you are likely to be regularly interacting with a CDN. CDNs reduce the geographical distance between users and a website’s content.
This is achieved through compressing and caching pages and distributing these to Points of Presence (PoPs). PoPs are access points located where there is a shared connection between two or more networks or devices.
As the PoP closest to the user will serve web pages, the request time is greatly minimised, improving Time to First Byte.
In addition, many advanced CDNs such as Cloudflare offer progressive image rendering. This technology is ideal for websites who heavily rely on high quality imagery to promote their products.
WordPress Platform Optimisation
On 2nd October 2020, Cloudflare announced the launch of their Automatic Platform Optimisation (APO) service, which is initially available for their WordPress customers using Cloudflare.
As highlighted in Lily Ray’s tweet, this is a very low-cost solution which will have a very positive impact on Time To First Byte whilst also reducing First Contentful Paint and Speed Index (how fast content is visually displayed during page load).
Use a host server which is close to your primary audience’s location
Alternatively, if you are a business who have limited budget and either operate in a specific area or have a primary audience in a particular country, you could look at changing your host server to be closer to the users rather than investing in a CDN.
The less physical distance that server requests have to travel, the quicker on-page resources can be requested and the faster load times will be the reward for the users who matter most.images to promote their products and/or services; giving the perception of fast loading and consequently, improving user experience and engagement.
Enable Gzip Compression
Depending on your CMS and how it has been configured by your technical team, Gzip Compression may already be activated via a plugin or a server software, such as Apache or IIS. So what exactly is it?
Gzip Compression is a process which automatically compresses web pages and their associated stylesheets before they are sent to the browser. This compression improves page loading times as it reduces the time taken for files to transfer from the server to the browser.
Upgrade Your DNS
The DNS is where domains are translated into Internet Protocol (IP) addresses to allow all browsers to load resources.
Unlike a free DNS – which is provided when purchasing a domain – a premium DNS is quicker and more secure, improving TTFB and putting your domain in a safer position in the event of a large scale cyber attack.
There are only so many optimisations that will enhance Time To First Byte (TTFB) – the initial waiting time for users to see your website’s content. To improve TTFB and consequently enhance page rankings and user engagement:
- Change your host server to be closer to your primary audience
- Keep your CMS plugins updated
- Implement TLS 1.3 encryption
- Use a Content Delivery Network (CDN)
- Activate Gzip Compression
- Switch to a premium DNS
So what are you waiting for? Speak to your development team about how you can improve TTFB.