{"id":2501,"date":"2020-12-01T04:55:53","date_gmt":"2020-12-01T04:55:53","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=2501"},"modified":"2025-08-28T06:05:59","modified_gmt":"2025-08-28T06:05:59","slug":"how-to-enable-http2-in-nginx","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/","title":{"rendered":"How To Enable HTTP2 in NGINX"},"content":{"rendered":"\n<p>HTTP\/2 is a network protocol that is a major upgrade to the traditional HTTP protocol used by websites. It  offers many advantages such as parallel processing, full multiplex, header compression, and even server push. It also improves data transfer speed and website security, without requiring any changes at the client end. It is important to set up HTTP2 in NGINX to improve website speed and performance. In this article, we will look at how to enable HTTP2 in NGINX.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#What_is_HTTP2\" >What is HTTP2?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#Why_Enable_HTTP2_in_NGINX\" >Why Enable HTTP2 in NGINX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#How_To_Enable_HTTP2_in_NGINX\" >How To Enable HTTP2 in NGINX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#1_Backup_NGIN_configuration_file\" >1. Backup NGIN configuration file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#2_Open_NGINX_configuration_file\" >2. Open NGINX configuration file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#3_Setup_HTTP2\" >3. Setup HTTP\/2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#4_Restart_NGINX_Server\" >4. Restart NGINX Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#5_Verify_HTTP2\" >5. Verify HTTP\/2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_HTTP2\"><\/span>What is HTTP2?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>HTTP2 is a network protocol to facilitate running of websites on the internet. It is supported by all major web browsers and offers tremendous advantages over HTTP protocol. It improves performance and speed by changing the way data is compressed and transferred between server and web browser. So the users don&#8217;t need to make any changes at their end. It uses the same request format, headers and status codes as requests using HTTP protocol. The magic happens during data transmission. The protocol to be used for data transmission is decided during connection establishment. Thereafter, using the same data as HTTP headers, the HTTP2 protocol gives better performance. Please note, it also works seamlessly on old browsers that support only HTTP protocols. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Enable_HTTP2_in_NGINX\"><\/span>Why Enable HTTP2 in NGINX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are several compelling reasons for upgrading your website to HTTP2.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Multiplexing<\/strong> &#8211; HTTP2 provides parallel processing by sending resources as multiple streams of data at once. On the other hand, HTTP loads data sequentially. So a large resource can hold up others. This doesn&#8217;t happen with HTTP2.<\/li>\n\n\n\n<li><strong>Prioritization<\/strong> &#8211; HTTP does not allow you to decide which resource to load first on a web page. It is basically first-cum-first-serve method. HTTP2 allows developers to decide which parts of your page to load first. For example, you can choose to load visible text and images before loading background items, making your web page load faster.<\/li>\n\n\n\n<li><strong>Header Compression<\/strong> &#8211; HTTP2 performs better compression of request\/response headers than HTTP, by smartly identifying and eliminating redundant data.<\/li>\n\n\n\n<li><strong>Server Push<\/strong> &#8211; HTTP2 even allows you to push content to client browsers before it is requested, thereby loading pages quickly.<\/li>\n\n\n\n<li><strong>Security<\/strong> &#8211; HTTP2 requires you to use SSL\/TLS so it is naturally more secure than HTTP.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_To_Enable_HTTP2_in_NGINX\"><\/span>How To Enable HTTP2 in NGINX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the steps to enable HTTP2 in NGINX. Before proceeding, please ensure:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You are using NGINX 1.9.5 or above. You can NGINX version with <em>nginx -v<\/em> command<\/li>\n\n\n\n<li>You have enabled HTTPS\/SSL. Here are the <a href=\"https:\/\/ubiq.co\/tech-blog\/nginx-ssl-configuration-step-step-details\/\">steps to configure SSL in NGINX<\/a>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Backup_NGIN_configuration_file\"><\/span>1. Backup NGIN configuration file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, it is essential to take a backup of your NGINX configuration file since it is the backbone of your server and you do not want to be able to easily rollback changes if things do not go as expected. Open terminal and run the following command to do a backup of this file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo cp \/etc\/nginx\/nginx.conf \/etc\/nginx\/nginx-backup.conf<\/pre>\n\n\n\n<p>Please note, in the next step, if you are going to use virtual host file instead of NGINX configuration file then take its backup instead.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo cp\u00a0\/etc\/nginx\/sites-enabled\/example.conf \/etc\/nginx\/sites-enabled\/backup-example.conf<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Open_NGINX_configuration_file\"><\/span>2. Open NGINX configuration file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Open terminal and run the following command to open NGINX configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi \/etc\/nginx\/nginx.conf<\/pre>\n\n\n\n<p>If you have configured separate virtual hosts for your website (e.g <em>www.example.com<\/em>), such as <em>\/etc\/nginx\/sites-enabled\/example.conf<\/em> then open its configuration with the following command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi&nbsp;\/etc\/nginx\/sites-enabled\/example.conf<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Setup_HTTP2\"><\/span>3. Setup HTTP\/2<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you have enabled SSL in NGINX, you will already have the following line in your server configuration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>listen 443 ssl;<\/code><\/pre>\n\n\n\n<p>Change it to the following to enable <a href=\"https:\/\/developers.google.com\/web\/fundamentals\/performance\/http2\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP\/2<\/a>. Just add &#8216;http2&#8217; to listen directive as shown.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>listen 443 ssl <strong>http2<\/strong>;<\/code><\/pre>\n\n\n\n<p>Your HTTPS server block will look something like<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>server { <\/code>\n    <code>listen 443 ssl http2; <\/code>\n    <code>ssl_certificate ...<\/code>\n   <code> ssl_certificate_key ...<\/code>\n<code> }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Restart_NGINX_Server\"><\/span>4. Restart NGINX Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Finally, run the following command to check syntax of your updated config file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nginx -t<\/pre>\n\n\n\n<p>If there are no errors, run the following command to restart NGINX server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo service nginx reload #debian\/ubuntu\n$ systemctl restart nginx #redhat\/centos\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Verify_HTTP2\"><\/span>5. Verify HTTP\/2<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Use a third party tools like <a href=\"https:\/\/tools.keycdn.com\/http2-test\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">KeyCDN HTTP2<\/a> checker that allow you to check if HTTP\/2 is enabled on your website.<\/p>\n\n\n\n<p>After you enter your website, with HTTPS URL, it will tell you if HTTP\/2 is enabled in it or not.<\/p>\n\n\n\n<p>As you can see, it is quite easy to enable HTTP\/2 in NGINX.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt what is HTTP2 protocol, why you should enable it on your NGINX server and also how to enable it. We highly recommend that you setup HTTP2 on your server. It is free of cost. You will start seeing immediate benefits after the upgrade. It will give better user experience, network bandwidth and server costs.<\/p>\n\n\n\n<p><a href=\"http:\/\/ubiq.co\/\">Ubiq<\/a>\u00a0makes it easy to visualize data in minutes, and monitor in real-time dashboards.\u00a0<a href=\"http:\/\/ubiq.co\/accounts\/register\">Try it<\/a> today!<\/p>\n\n\n\n<p>Also read<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-fix-nginx-413-request-too-large-error\/\">How to Fix NGINX 413 Request too large error<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-remove-www-from-domain-url-in-nginx\/\">How to Remove WWW from Domain URL in NGINX<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-redirect-http-to-https-in-nginx\/\">How to Redirect HTTP to HTTPS in NGINX<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-configure-basic-authentication-in-nginx\/\">How to Configure Basic Authentication in NGINX<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is important to setup HTTP2 in NGINX. Here is how to enable HTTP2 in NGINX.<\/p>\n","protected":false},"author":1,"featured_media":2505,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[246],"class_list":["post-2501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nginx","tag-https2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Enable HTTP2 in NGINX - Ubiq BI<\/title>\n<meta name=\"description\" content=\"It is important to setup HTTP2 in NGINX to improve website performance and speed. Here is how to enable HTTP2 in NGINX.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Enable HTTP2 in NGINX - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"It is important to setup HTTP2 in NGINX to improve website performance and speed. Here is how to enable HTTP2 in NGINX.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-01T04:55:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-28T06:05:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How To Enable HTTP2 in NGINX\",\"datePublished\":\"2020-12-01T04:55:53+00:00\",\"dateModified\":\"2025-08-28T06:05:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/\"},\"wordCount\":795,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1\",\"keywords\":[\"https2\"],\"articleSection\":[\"Nginx\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/\",\"name\":\"How To Enable HTTP2 in NGINX - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1\",\"datePublished\":\"2020-12-01T04:55:53+00:00\",\"dateModified\":\"2025-08-28T06:05:59+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"It is important to setup HTTP2 in NGINX to improve website performance and speed. Here is how to enable HTTP2 in NGINX.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1\",\"width\":1024,\"height\":512,\"caption\":\"setup http2 in nginx\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-enable-http2-in-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Enable HTTP2 in NGINX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Enable HTTP2 in NGINX - Ubiq BI","description":"It is important to setup HTTP2 in NGINX to improve website performance and speed. Here is how to enable HTTP2 in NGINX.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/","og_locale":"en_US","og_type":"article","og_title":"How To Enable HTTP2 in NGINX - Ubiq BI","og_description":"It is important to setup HTTP2 in NGINX to improve website performance and speed. Here is how to enable HTTP2 in NGINX.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-12-01T04:55:53+00:00","article_modified_time":"2025-08-28T06:05:59+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg","type":"image\/jpeg"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How To Enable HTTP2 in NGINX","datePublished":"2020-12-01T04:55:53+00:00","dateModified":"2025-08-28T06:05:59+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/"},"wordCount":795,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1","keywords":["https2"],"articleSection":["Nginx"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/","name":"How To Enable HTTP2 in NGINX - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1","datePublished":"2020-12-01T04:55:53+00:00","dateModified":"2025-08-28T06:05:59+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"It is important to setup HTTP2 in NGINX to improve website performance and speed. Here is how to enable HTTP2 in NGINX.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1","width":1024,"height":512,"caption":"setup http2 in nginx"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-http2-in-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How To Enable HTTP2 in NGINX"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/setup-http2-nginx.jpg?fit=1024%2C512&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-El","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/2501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=2501"}],"version-history":[{"count":12,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/2501\/revisions"}],"predecessor-version":[{"id":3468,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/2501\/revisions\/3468"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/2505"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=2501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=2501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=2501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}