Many SEO professionals have been noticing HTTP/2 showing on their Google Lighthouse audit report, but what exactly does HTTP/2 mean and how can it be used to better your SEO service?
Today we will look at the meaning of HTTP/2, how it works, the advantages and disadvantages and how page speed can be improved by its implementation.
HTTP/2 is a protocol used for governing communication between a browser, requesting information, and the server that is storing the requested information.
HTTP/2 took the place of predecessor HTTP/1 in November 2020 when Google announced that the new protocol would start crawling sites. It was confirmed in May 2021, by John Mueller, that over half of all urls had already been crawled by HTTP/2 protocol.
John Mueller commented that, “this means Googlebot won’t need to spend as much time crawling your server as before.”
What is a Protocol?
The rules that manage the communication between the client and the server is referred to as a protocol. There are three parts to a protocol:
- Header – this contains information about the source IP address and the destination IP address as well as details about size and time.
- Payload – this the information that will be transmitted.
- Footer – the footer routes the requested information, ensuring it reaches the correct recipient’s browser with no errors.
What is the Difference Between HTTP/1 and HTTP/2?
Tom Anthony’s ‘truck analogy’ is a simple way to explain exactly what a HTTP request is:
Think of the truck as the request from a client to a server. The truck travels along the network until it reaches the server. Once the truck has reached its destination it will load the response and then return it to the browser.
To ensure that the contents of the truck cannot be seen by anyone outside the truck, HTTP is used to add a layer of protection so that sensitive information and personal data is not compromised.
One of the problems with the truck making the request is that it cannot travel faster that the speed of light. The truck must travel at a consistent speed irrespective of the distance and size of the request.
It is important to note at this point that most websites require a sequence of multiple requests and responses in order to load a single page. Images, CSS and/or Java scripts will require many trips to and from the server.
With the HTTP/1 protocol, the truck would need its own individual path or road (network request) and a separate road would be needed for certain requests. This ultimately leads to a delay to the transfer of data following an instruction, otherwise known as network latency.
Only six simultaneous connections can typically be made at the same time which means that other requests (trucks) are forced to wait until the network (road) once again becomes free.
This is where HTTP/2 comes in! Created to improve request behaviours by allowing more ‘trucks’ to ride on the same road at the same time, allowing the network to process more requests and at a faster speed. This has been made possible by what is called the Multiplex feature.
With Http/2, there is no actual change in the content of the requests, it is the way that they are managed which has changed.
Tech Features of HTTP/2
To make the transition as smooth as possible, it was decided that the protocol should be more of a refresh than a full migration. This was possible due to HHTP/2 being built on the same syntax as HTTP/1. The key features of the HTTP/2 are as follows:
- Binary instead of Textual – a change made to the transforming protocol to complete response cycles using 1’s and 0’s (binary) instead of text.
- Multiplex – breaks down the payload into smaller sequences to be transmitted over a single connection. The sequences are reassembled before reaching the intended browser.
- Header Compression – this feature reduces the overhead that comes with the slow-start mechanism in http/1, which in turn reduces latency and unnecessary consumption of limited network resources. Header compression functions by compressing a large number of redundant header frames and retaining a list of headers used for previous requests. To put it simply, headers will be encoded together in one compressed block and sent to the client.
- Server Push – uses information, based on the client’s previous requests, to anticipate future requests. The resources that are most likely to be used are pushed into the browsers cache prior to them being requested which removes the need for a request and response round trip.
- Stream Prioritisation – this is where specific data streams are given priority over others. Preference is decided by the weight and dependencies assigned to each data stream. The server can then optimise resource allocation based on the end user’s requirements.
HTTP/2 – The Pro’s
As HTTP/2 is not an actual migration it requires no change in URLs and will also not need any major adjustments when it comes to SEO. However, there are some advantages when looking from an SEO perspective:
- Web Performance – Some of the functions of HTTP/2 were designed to assist in minimising resources needed to crawl websites. Multiplex is one of the features that contributes to the speed of the web by stopping requests and responses from blocking each other thereby reducing network latency. Stream prioritising reduces the time taken for a request to be returned to the user by putting more preference on specific streams of data.
- Mobile Performance – Mobile performance is improved, due to the website design taking current user trends into account, especially with the increase in mobile activity which is expected to increase further. Header compression and multiplexing, in particular, have had a positive effect on reducing latency and improving overall end user satisfaction.
- Better User Experience – According to Google, if a page load takes from one to three seconds, there is a 32% increase in bounce rate. HTTP/2 gives an improved, all round user experience due to faster loading times and more efficient web performance.
- Improved Security – The fact that HTTP/2 is required to be served over HTTPS means all websites are encrypted and secured. The applications themselves are safe from malicious attacks preventing sites from being penalised or dropped from search results entirely.
- SEO Advantages – The combination of the above has a positive effect when it comes to working with your SEO firm. Whilst it has been confirmed by Google that the new protocol will not affect ranking, they have said, however, that the upcoming Page Experience update, will be indirectly ‘fed’ by the HTTP/2 protocol, which will have an impact on visibility.
HTTP/2 – The Cons
As with everything there are always a few cons:
- Not all browsers support HTTP/2 – By the end of 2015, most major browsers had adapted to support the new protocol, but as it stands, there are still nine older browsers who do not support HTTP/2, although these browsers have a low level of users.
- Wasted bandwidth – The server push feature may end up sending unnecessary data to a browser. Anticipated requests don’t in fact always happen, this leads to a waste of bandwidth as the data sent to the browser may never be used.
- Multiplexing can overwhelm servers – When the server receives a number of short burst of requests at the same time, the server can become overwhelmed, resulting in complications and delays in debugging, largely because of the use of binary in place of text.