In this tutorial, you will learn how to enable HTTP2 within Umbraco CMS. Over the last year or so, HTTP2 has become a more widely adopted feature, yet many web developers still seem to be a little unsure about why they should try to use it. To help remove this doubt, I'm going to talk about what HTTP2 is, why you should be using it and how to implement it with your Umbraco website.

What Is HTTP2?

We all know and love HTTP, however, it's getting on a bit in age now. Over the last 2 decades, websites have come a long way. In the 90s, web development involved simple HTML elements with some spinning gifs. Nowadays, according to research by Daniel Sternberg, the average web page size is 1.9 MB. Each page on average contains over 100 individual resources. As HTTP doesn't deal particularly well with retrieving a large number of resources, some clever people at Google researched some ways to support it better, which resulted in a protocol called the SPDY specification. The aim of SPDY was:

  • Allow concurrent requests across a single TCP connection, known as multiplexing
  • Allow browsers to prioritize assets so that resources vital to the display of a page could be sent by the server first
  • Compress and reduce HTTP headers
  • Implement server push, whereby a server can push vital resources to the browser before being asked for them.

Most modern browsers support SPDY, however, times have moved and it's slowly becoming deprecated. HTTP2 is the agreed protocol of the future and it's the protocol you should be focusing on. HTTP2 was built upon the principles SPDY, so using HTTPS will provide the performance benefits listed above. Put simply, an HTTP2 connection will load a website quicker than an HTTP connection assuming it has been written in an HTTP2 manner.

The main reason for this performance benefit comes from the multiplexing support. Multiplexing, allows a client's browser to download more of your web page HTTP requests in parallel making it quicker to render. Moving forward, as more servers are updated to support HTTP2 and more people have browsers that support HTTP2, your once well-honed and performance website will start to seem slower compared to websites optimized for the new protocol. This is why HTTP2 is something all good web developers should be starting to think about implementing.


How can I test it my current website uses HTTP2

Checking if your current website uses HTTP2 is quick and painless. There's an online checker you can use here, simply visit the page, enter your website's Url and check.


How To Install HTTPS2

Here's the good news/bad news part. In order to use HTTP2 on ASP.NET powered websites, your servers will need to run IIS 10. IIS 10 only comes with Windows 10 or Windows Server 2016 and as of writing IIS 10 (or HTTP2 support) has not been made available for older operating systems. If you are building a new site, I would highly recommend you run the latest version of Windows just for this benefit. If your servers are running older versions then you will have to make the business decision if the cost of upgrading all your servers is worth it. The only other thing you need for HTTP2 support is an HTTPS certificate, as IIS10 will create HTTP2 connections when using HTTPS.

If your website doesn't use HTTPS yet, I would strongly recommend reading this article, Umbraco SEO, HTTP or HTTPS?. Purchasing an SSL certification is cheap (£30 a year), it provides your site with an SEO ranking bonus, it makes your site more secure and it can also make your website run faster! It's a no-brainer to get one!

Umbraco is free, so paying out £30 a year is tiny. I won't go over the process of how to register for an SSL certificate here. If you want to learn more though, there's a good tutorial here. After enabling HTTPS on your IIS v10 webs server (or above), your server should automatically start using HTTP2 for you... it's that simple!

The aim of this guide was to make you aware of HTTP2, the benefits your website will gain from using it and in reality how easy it is to get up and running with it. Granted if your current website isn't on Server 2016 upgrading now might be too much work, however, if you can upgrade then you will get a lot of useful benefits. Most SEO companies will now flag that your website doesn't run under HTTP2, so having an understanding around it is something we will all need, sooner rather than later. Happy Coding 🤘