Despite the obvious benefits, HTTP/2 is rarely talked about by SEO pros, and I’d go out on a limb and say that the majority of them would struggle to explain how it works and why it’s necessary.
With Google putting more value on site speed in their search algorithms, you can’t afford to ignore HTTP/2 and the benefits it can have for making sites faster.
Last month, DeepCrawl (disclosure: I work for DeepCrawl) held a webinar with Tom Anthony of Distilled, who explained what HTTP/2 is and why it matters.
Many questions were submitted by attendees over the course of the webinar and Anthony has taken the time to answer each and every one of them so you can boost your knowledge and prepare yourself for switching to HTTP/2.
The Basics of HTTP/2
Is HTTP/2 valuable only if you are interested in SEO or does it have any other benefits?
It is helpful for SEO only because it is good for users, and Google wants users to have good experiences.
The primary benefit is the performance of your pages for users.
Why wouldn’t someone want to use HTTP/2? Are there any negatives?
There are very few reasons not to have HTTP/2.
- Isn’t a migration so doesn’t impact SEO.
- Falls back gracefully to HTTP/1.1 so doesn’t prevent anyone accessing the site.
- Speeds things up.
Be wary of the Server Push feature, as that could negatively impact you – but if you are just enabling HTTP/2 then, by default, Server Push won’t be used anyway.
Does HTTP/2 improve performance for mobile, too?
Yes, it does!
Are there any technical requirements for the servers to launch HTTP2?
Yes, only certain server software can support HTTP/2 at the moment.
If your system cannot or the level of effort to get it there is too great, then consider using a CDN to implement it.
How long does it take IT to upgrade to HTTP2?
I’ve deployed HTTP/2 on small sites in under an hour.
On enterprise sites, I’ve seen it be scheduled for weeks.
It really is a factor of how large and complex your site is, and how busy your team is.
Is there an easy way to tell if a site is using HTTP/2 in the source code?
It is important to understand that the source code won’t change for HTTP/2 – it is a change to the delivery mechanism for how HTML and other files are delivered to your browser, but the files themselves stay the same.
If you want to see if a site is using HTTP/2, use Chrome developer tools and add in the protocol column.
There’s also a Chrome extension which will immediately tell you if a site is using HTTP/2.
If you run a site on HTTP/2, should you have HTTP/1.1 as a fallback?
Yes – there are still many devices/bots that don’t support HTTP/2.
Currently, if you turned off HTTP/1.1 then Googlebot could not crawl your site.
However, there is no reason not to provide the fallback.
Getting HTTP/2 Buy-in
So HTTP/2 means we can be a lot less aggressive about numbers of page calls?
Because I can see developers throwing that in my face when I tell them their site is too slow.
A pageview is still a pageview, unfortunately.
Only if you deploy via CDN will you potentially see a decrease in load on your servers.
Our new engineering lead used a third party tool to show performance benefits we’d realize from moving to HTTP/2. It showed we’d be 25 percent slower moving to HTTP/2. How is that possible?
I think there are pathological cases you could construct where the flow of the page is held up by the parallelism.
Imagine, the HTML needs to load a CSS file and 100 images. If all of these are requested at once then you may hit bandwidth limits that means the CSS arrives slightly slower than in the old model, which holds up the time to render the page initially for users (even though all the resources have loaded quicker).
However, I’ve never seen that in reality, and would be surprised to actually come across a site that is slower with HTTP/2.
Furthermore, the stream prioritization mechanism of HTTP/2 should allow you to offset this (put the CSS in the fast lane).
I’ve been told that a CDN setup would see more value from HTTP/2 as all of the client sites we operate are housed on the same server. Is this true? And is there still HTTP/2 value for a setup with domains housed all on one server?
I can’t understand the logic behind “since all of the client sites we operate are housed on the same server, there isn’t as much value from HTTP/2” to be honest.
Whether one server is responsible for multiple sites or not shouldn’t make any difference at all to the benefits of HTTP/2.
However, if it’s easier for your team to deploy a CDN to get the benefits of HTTP/2 then that also works!
How CDNs Help With HTTP/2?
Do Content Distribution Networks (CDNs) help with HTTP2?
CDNs can help your site speak HTTP/2, but they also provide a wealth of other benefits.
For example, they will also mean that many requests to your site do not need to travel as far, which also speeds up your site considerably.
Furthermore, they can do other clever stuff like optimize your images on the fly etc.
How do I go about finding a CDN? Can you explain how to get HTTP/2?
In order to deploy HTTP/2, you need the server that is receiving requests for your web content to be able to speak that language with the browser.
When the secure connection is initially being opened, the server tells the browser whether it can speak HTTP/2.
In my analogy, you could think of this as the steamroller driver asking the server about it as he is making the road – then when he gets back he lets the browser know if they can send multiple trucks or not!
Therefore, you need to upgrade/configure your server software (e.g., nginx) to be capable and willing to speaking HTTP/2.
If this is not something your team or hosting company can accommodate, then you can deploy a CDN instead.
The CDN will then sit between your server and your web users, and it can speak HTTP/2 on your behalf.
There are a variety of CDN providers, but the two that you should look at are:
- CloudFlare: A good “out of the box” solution and is very competitively priced – so is great for small sites.
- Fastly: It’s a bit more expensive but is extremely flexible (if you know what you are doing) and is capable of more complex behaviors for you trickier needs!
Both of these CDNs can speak HTTP/2 for you.
If I use CloudFlare to anticipate HTTP/2, would activating it on my server help improve latency even more?
At the moment none of the CDNs actually speak HTTP/2 from the CDN to the origin server, so if you deployed CloudFlare and used it for HTTP/2, then there is nothing to do on your server’s side at all.
Does HTTP2 require use of CDNs and how do CDNs handle changes to my site? Does it need to propagate? If so, how long would it take to be worldwide?
It does not require the use of a CDN, no.
They are just an easy way to implement it.
In order to propagate worldwide, it would depend on the CDN, but nowadays likely just a few seconds – and that time certainly isn’t something to worry about.
If multiplexing reduces the number of connections to the server – does this improve overall server performance/resources?
I’ve not measured or tested this, but I’d anticipate the impact is minimal.
Maintaining multiple network connections isn’t difficult for a server – responding to the requests is more of the load, and that won’t change much.
If you deployed via the CDN route then you’d offset some server load/bandwidth as the CDN would be able to respond to some requests on your behalf.
When you have multiplexing, you still need to make a request for each resource (each truck can still only carry one file).
Server Push may be a single request but could get multiple responses though, carrying various files.
However, this would need to be an active decision on the server’s side.
Since optimizations are different for HTTP/2 compared to HTTP/1.1, does that mean your development team needs to continually optimize resources for both?
There are some recommendations that may differ between HTTP/1.1 and HTTP/2 but they are few and far between.
The primary ones would be domain sharding and sprite sets.
I’d recommend deploying HTTP/2 if you haven’t already and then leaving your other optimizations as they already are (i.e., don’t abandon sprite sets if they are already in place).
Moving forward I think we’ll see more clarity around best practices here, but in general if you optimize for HTTP/1.1 traffic you won’t be harming HTTP/2 traffic.
However, it may not be worth the effort if most of your traffic is HTTP/2, where the benefits of these things is far reduced.
Will all resources load at the same time with HTTP/2? Is there a cutoff for the number of resources that will load at the same time, or are there other limitations?
The maximum number of simultaneous ‘streams’ (trucks on our road!) is up to the server, but the RFC (the document that details the standard) recommends being at least 100!
In reality, and for most sites, this is rarely ever going to be something you have to worry about.
When using HTTP/2, is domain sharding for assets useful, or would it now have a negative impact because it opens up a new connection? (e.g., www.example.com gets images from cdn.example.com)
With HTTP/2 there is little reason to do old school sharding where you have 3+ subdomains, which was designed to overcome the maximum of six connections per server.
However, if you have a ‘light’ sharding setup (static assets on a separate subdomain on a CDN) then sometimes it can be hard to disentangle that setup easily, so I just wouldn’t worry too much and wouldn’t let that prevent me moving to HTTP/2 (on both the subdomains).
Do you think GZIP/Brotli plays a part in this speed of website equation? CDNs seem fairly varied on what/how they implement HTTPS/2 and GZIP/Brotli
So GZIP and Brotli are definitely helpful for most websites where the resources can get quite large nowadays.
Brotli support is still lacking in some areas, but GZIP is pretty universal nowadays.
HTTP/2 actually complicates this a bit further by introducing a new compression standard called HPACK.
It allows us to compress the HTTP header section, which is actually more impactful than it sounds.
It doesn’t change the GZIP/Brotli issue for assets, though.
John Henshaw mentioned Chrome may implement this using an ‘importance’ attribute. Is there a chance HTTP/2 may override the one we hard code, say for FCP, FMP purposes?
The HTTP/2 standard allows for “stream prioritization,” which essentially allows you to designate some requests as being more important than others.
I don’t know if that is what Henshaw was talking about, but it may have been the priority that Chrome assigns to resources via a heuristics methodology where they try to work out what is more important (rather than you specifying it directly).
Out of the box, HTTP/2 won’t interfere with those heuristics, but the HTTP/2 stream prioritization mechanism would allow you more fine-grained control by specifying relative priorities of resource as well as dependencies.
Getting to Grips With HTTP/2
Hopefully, Anthony’s expert knowledge on HTTP/2 has helped you better understand its importance, as well as assisting you with explaining some of the how-to’s around implementation.
More Web Development Resources:
- How to Improve Page Speed for More Traffic & Conversions
- 6 WordPress Plugins That Will Speed up Your Site
- How Will Mobile Page Speed Impact Your Google Rankings & UX?
Featured Image: Unsplash.com
In-post Photos: Pixabay.com, Pexels.com, Unsplash.com
Screenshot taken by author, August 2018
Subscribe to SEJ
Get our weekly newsletter from SEJ's Founder Loren Baker about the latest news in the industry!