What is TTFB? How to Optimize Server Response Time
One of the most challenging aspects of improving site speed is resolving “Reduce initial server response time” (TTFB) errors. In this article, I will try to explain what needs to be done to minimize the TTFB issue. I will also discuss the importance of server & hosting selection for SEO in a little more detail.
What is Time To First Byte (TTFB)?
We can define TTFB as a measurement of the time between the client's request (HTTP & HTTPS) and the first byte received from the website.
You can measure the current TTFB on Zeo's website using the following code:
new PerformanceObserver((entryList) => {
const [pageNav] = entryList.getEntriesByType('navigation');
console.log(`TTFB: ${pageNav.responseStart}`);
}).observe({
type: 'navigation',
buffered: true
});

A good TTFB value is also very important for website speed optimization. This will positively affect your rankings and improve Googlebot's crawl frequency.
What is a Good TTFB Value?
TTFB can vary considerably depending on the type of content you serve (static or dynamic), your server configuration, and so on. Therefore, it is difficult to say what a good TTFB score is, and it varies depending on your site's circumstances.
On average, a TTFB below 100 ms is an excellent value. Values between 200–500 ms can be considered average, while values between 500 ms and 1 s may not be considered ideal. In some cases, depending on the type of site or page, a TTFB longer than 1 second may be completely unavoidable.
If you see this error in PageSpeed results, it is because the value is above 600 ms:

You can check the average server response time through Search Console search statistics:

If you have a shared server or host multiple sites on one server, the load on the sites may vary depending on the other sites on the server. Of course, TTFB should not be confused with server response time.
What Slows Down TTFB Value?
Here are the main factors that slow down the TTFB value:
- Poorly configured server infrastructure,
- Server capacity issues (bandwidth, RAM, etc.),
- Dynamically generated content,
- Database queries.
How to Measure TTFB?
In Page Speed Insight results, you may come across an error/warning such as “reduce the time to first byte”:

TTFB issues specific to lab data are shown in the document request latency section:

You can also measure the TTFB values in Google Chrome Network:

You can also run a TTFB test here: https://gtmetrix.com/.

You can clearly monitor the process via Speed Visualization as well:

In that case, this website https://www.webpagetest.org/ is also helpful for you:

If you would like to explore more data related to industries or platforms (such as WordPress), you can visit the page here:

How to Optimize Time to First Byte (TTFB)?
There are many methods you can use to optimize TTFB. For many of these recommendations, you may need to work closely with hosting companies or development teams.
Cache
Generating a page requires many interactions and processes. Since each interaction takes time, the TTFB value can be affected as a result. With caching integrations, you can store copies of the results of these processes in advance and reduce loading times.

If you have a site built on a platform such as WordPress, you can use plugins like W3 Total Cache or LS Cache.
HTTP/2 Usage
Googlebot generally crawls over HTTP/1.1; however, starting in November 2020, Google also sent messages to site owners through Search Console, stating that Googlebot could crawl their sites over HTTP/2 if they were using this version:

You can identify resources that use HTTP/2 with Chrome:

CDN Usage
You can optimize TTFB by using a CDN. If you have a site that receives a lot of traffic, a CDN can be a very sensible choice to ensure resources load quickly.

Database Optimization
The back-end team will certainly have more to contribute to this subsection. Additional modules added to websites, old user databases, or numerous queries can create extra load on databases. Therefore, optimizing databases will also be beneficial.
If you use cPanel, you can view unused databases and database users there and remove the appropriate ones:

Example Mysql users:

If you use Wordpress, with the help of PhpMyAdmin, you can check the tables left from the older extensions. Thus, you can reduce the database load caused by the disused extensions:

For instance, I can see the vacant table structures with the order below:
select table_schema as database_name,
table_name
from information_schema. tables
where table_type = 'BASE TABLE'
and table_rows = 0
and table_schema not in ('information_schema', 'sys',
'Performance_schema', 'mysql')
-- and table_schema = 'sakila' -- put your database name here
order by table_schema,
table_name;
When I start running the SQL, it shows me the results:

SQL results may differ from website to website. In these examples, you can see more or fewer table structures. Before getting to these steps, please do not forget to backup your data:

Extensions such as WP Speed of Light and WP website owners can arrange the DB-related operations even faster. Surely you can use other extensions or you can continue these processes without any extensions:

And if you have a website with a PHP infrastructure, you had better upgrade it to the latest version:

How to Choose the Best Server?
I would like to elaborate on how you can choose the most suitable server in terms of SEO.
Bandwidth
Monthly bandwidth is one of the most important things to consider when choosing hosting. If you are purchasing custom software, you can ask about the server specifications in advance. Since server issues occur very frequently on e-commerce sites, you can take precautions ahead of time. You can test TTFB values on the test site and compare the results. Make sure you monitor this aspect of any server, hosting, or VPS service you purchase. A sudden surge in traffic caused by a trend can exhaust all your bandwidth when you least expect it:

You can analyze the last 24 hours or the last week:

You can also assess how much bandwidth you use for which month. If you have a website with low traffic, you may not prefer a wide bandwidth. Instead, you can get a more suitable server for your website and fulfill your server need at lower costs:

If your bandwidth does not meet the traffic your website receives, server errors may be multiplied and your website may become "suspended":

Taking all of these points into consideration, you can buy hosting from the domestic market or foreign markets by deciding on the packages suitable for your website:

If you use shared hosting, you most probably will be subject to certain limits even though it is stated that you have limitless bandwidth. That is why you should always know the CPU limits in hosting packages and communicate with your server manager on how hard you can push these limits. We do not come across this problem in packages such as VPS/Dedicated Servers/ (depending upon the hosting firm for sure) however, still consider asking:

Googlebot may also slow down the searching speed if the server bandwidth is low. Furthermore, in server changes, the searching speed may be readjusted by Googlebot because it will try to understand what the gap is between the new server and the old one:

You can also create your server with hardware features such as SSD disk. Besides, RAM size and processor features are among the key elements. A server with a faster processor can lead several operations to run more quickly:

The reason why I elaborate on hosting that much intensely is that Google also made announcements about it:

Lite Speed Usage
You can have a faster performance by installing LiteSpeed on your servers. LiteSpeed with a paid license offers better results compared to its competitors.

You can find an example for LiteSpeed installed on Cpanel in the image below. You can make all of the settings on this screen and if needed, you can restart LiteSpeed Web Server:

While deciding on a server, you make sure LiteSpeed is included:

Reducing the HTTP Requests
First of all, make sure that you remove Yandex Metrica or similar codes that you do not use or rarely use once in a year from the source code. In this way, you can make some great benefits by deleting the codes barely working for you. Fewer HTTP requests will lead to faster upload times.
If there are third-party files and several CSS & JS files on your site, these ones will create some additional requests. The more HTTP requests a browser creates, the longer it takes for your page to upload.
You can check the number of requests via Chrome, for instance, there are 179 requests for the homepage of Zeo:

You can also check out the detailed outlook of the requests via GTmetrix:

To optimize the number of requests, remove, combine, or minify unnecessary JS and CSS files. You can plan to combine image elements or, if there are unnecessary ones, reduce their number and minimize their size as much as possible. I recommend tracking decreases or increases in the number of requests:



















