How to Fix ERR_HTTP2_PROTOCOL_ERROR After Enabling HTTPS
Transferring your website onto HTTPS is a wise decision because it leads to better security as well as increased SEO and user trust. However, after enabling HTTPS, you might run into a frustrating message in your browser: ERR_HTTP2_PROTOCOL_ERROR. This error is usually accompanied by little context, and you wonder what you did wrong. In this guide, we’ll break down what causes this error, why it may appear after enabling HTTPS, and how to fix it step by step. What is ERR_HTTP2_PROTOCOL_ERROR? ERR_HTTP2_PROTOCOL_ERROR is a browser-side error that occurs when there’s a failure in communication between the web browser and the server using the HTTP/2 protocol. HTTP/2 is the modern version of HTTP, designed to make web pages load faster and more efficiently using features like multiplexing and header compression. When this error pops up, it typically means that either: The server is sending malformed or unexpected data, or The browser is misinterpreting the data due to software bugs or cache conflicts. Why Does This Error Appear After Enabling HTTPS? If you’ve recently added an SSL certificate and enforced HTTPS, this error could be triggered by several factors: 1. Improper SSL Configuration Misconfigured SSL settings can interfere with how the server communicates over HTTP/2. 2. Unsupported or Misconfigured HTTP/2 Module Not all servers support HTTP/2 by default. If HTTP/2 is not enabled or is incorrectly set up, this error may occur when attempting a secure connection. 3. Conflicting Middleware (e.g., CDN, Proxy, Firewall) Services like Cloudflare or reverse proxies can sometimes conflict with your server’s HTTPS and HTTP/2 settings. 4. Outdated Browser or OS If the client (browser) isn’t fully compatible with HTTP/2 or has corrupted cache data, it can misinterpret legitimate responses as protocol errors. How to Fix ERR_HTTP2_PROTOCOL_ERROR – Step-by-Step Let’s walk through the most effective solutions to resolve this error after enabling HTTPS. 1. Check SSL Certificate Validity and Configuration Since this error appears after HTTPS is enabled, start by verifying your SSL certificate. Use an SSL Checker Tool (like SSL Labs or a browser extension) Check if the certificate is valid, properly chained, and not expired. Look for any warning related to intermediate certificate mismatches. Ensure HTTPS Redirection is Properly Set Redirect all HTTP traffic to HTTPS via .htaccess (Apache) or server block (Nginx) without causing loops or conflicts. Apache Example: apache RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Nginx Example: nginx server { listen 80; server_name example.com; return 301 https://$host$request_uri; } 2. Confirm HTTP/2 is Enabled on Your Server Enabling HTTPS doesn’t automatically mean HTTP/2 is active. You need to confirm HTTP/2 support and enable it explicitly. On Apache: Make sure the mod_http2 module is enabled: a2enmod http2 Then add this directive to your SSL-enabled VirtualHost block: apache Protocols h2 http/1.1 Restart Apache: bash sudo systemctl restart apache2 On Nginx: Ensure your server block looks like this: nginx listen 443 ssl http2; And that Nginx was compiled with HTTP/2 support (you can verify using nginx -V). 3. Clear Browser Cache and Cookies Sometimes, after switching to HTTPS and HTTP/2, the browser still holds old cache data, leading to protocol conflicts. To clear cache in Chrome: Go to Settings > Privacy and Security > Clear browsing data Select “Cached images and files” and “Cookies” Hit “Clear data” Afterward, reload the page or open it in an incognito window to test. 4. Disable Browser Extensions and Try Incognito Mode Certain browser extensions (especially those that intercept or filter HTTPS traffic like ad blockers or antivirus extensions) may misinterpret or block parts of the HTTP/2 response. Disable all extensions temporarily Visit the site in Incognito Mode using Ctrl + Shift + N If the error disappears, re-enable extensions one by one to identify the culprit 5. Temporarily Disable Firewall or Antivirus Some aggressive firewall or antivirus software can interfere with HTTP/2 connections over HTTPS. They may block packets they misidentify as suspicious, even when they are perfectly valid. To test: Temporarily disable your antivirus or firewall Reload the site in the browser If the error goes away, consider adding your site to the software's exception list. 6. Update Your Browser and Operating System Outdated browsers may lack full HTTP/2 support or contain unresolved bugs related to HTTPS. The same goes for your operating system's network stack. Update your browser to the latest version On Windows, go to Settings > Windows Update On Mac, go to System Preferences > Software Update 7.

Transferring your website onto HTTPS is a wise decision because it leads to better security as well as increased SEO and user trust. However, after enabling HTTPS, you might run into a frustrating message in your browser: ERR_HTTP2_PROTOCOL_ERROR
. This error is usually accompanied by little context, and you wonder what you did wrong.
In this guide, we’ll break down what causes this error, why it may appear after enabling HTTPS, and how to fix it step by step.
What is ERR_HTTP2_PROTOCOL_ERROR?
ERR_HTTP2_PROTOCOL_ERROR
is a browser-side error that occurs when there’s a failure in communication between the web browser and the server using the HTTP/2 protocol. HTTP/2 is the modern version of HTTP, designed to make web pages load faster and more efficiently using features like multiplexing and header compression.
When this error pops up, it typically means that either:
- The server is sending malformed or unexpected data, or
- The browser is misinterpreting the data due to software bugs or cache conflicts.
Why Does This Error Appear After Enabling HTTPS?
If you’ve recently added an SSL certificate and enforced HTTPS, this error could be triggered by several factors:
1. Improper SSL Configuration
Misconfigured SSL settings can interfere with how the server communicates over HTTP/2.
2. Unsupported or Misconfigured HTTP/2 Module
Not all servers support HTTP/2 by default. If HTTP/2 is not enabled or is incorrectly set up, this error may occur when attempting a secure connection.
3. Conflicting Middleware (e.g., CDN, Proxy, Firewall)
Services like Cloudflare or reverse proxies can sometimes conflict with your server’s HTTPS and HTTP/2 settings.
4. Outdated Browser or OS
If the client (browser) isn’t fully compatible with HTTP/2 or has corrupted cache data, it can misinterpret legitimate responses as protocol errors.
How to Fix ERR_HTTP2_PROTOCOL_ERROR – Step-by-Step
Let’s walk through the most effective solutions to resolve this error after enabling HTTPS.
1. Check SSL Certificate Validity and Configuration
Since this error appears after HTTPS is enabled, start by verifying your SSL certificate.
Use an SSL Checker Tool (like SSL Labs or a browser extension)
- Check if the certificate is valid, properly chained, and not expired.
- Look for any warning related to intermediate certificate mismatches.
Ensure HTTPS Redirection is Properly Set
- Redirect all HTTP traffic to HTTPS via
.htaccess
(Apache) orserver block
(Nginx) without causing loops or conflicts.
Apache Example:
apache
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Nginx Example:
nginx
server {
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}
2. Confirm HTTP/2 is Enabled on Your Server
Enabling HTTPS doesn’t automatically mean HTTP/2 is active. You need to confirm HTTP/2 support and enable it explicitly.
On Apache:
Make sure the mod_http2
module is enabled:
a2enmod http2
Then add this directive to your SSL-enabled VirtualHost block:
apache
Protocols h2 http/1.1
Restart Apache:
bash
sudo systemctl restart apache2
On Nginx:
Ensure your server block looks like this:
nginx
listen 443 ssl http2;
And that Nginx was compiled with HTTP/2 support (you can verify using nginx -V
).
3. Clear Browser Cache and Cookies
Sometimes, after switching to HTTPS and HTTP/2, the browser still holds old cache data, leading to protocol conflicts.
To clear cache in Chrome:
- Go to
Settings > Privacy and Security > Clear browsing data
- Select “Cached images and files” and “Cookies”
- Hit “Clear data”
Afterward, reload the page or open it in an incognito window to test.
4. Disable Browser Extensions and Try Incognito Mode
Certain browser extensions (especially those that intercept or filter HTTPS traffic like ad blockers or antivirus extensions) may misinterpret or block parts of the HTTP/2 response.
- Disable all extensions temporarily
- Visit the site in Incognito Mode using Ctrl + Shift + N
- If the error disappears, re-enable extensions one by one to identify the culprit
5. Temporarily Disable Firewall or Antivirus
Some aggressive firewall or antivirus software can interfere with HTTP/2 connections over HTTPS. They may block packets they misidentify as suspicious, even when they are perfectly valid.
To test:
- Temporarily disable your antivirus or firewall
- Reload the site in the browser
If the error goes away, consider adding your site to the software's exception list.
6. Update Your Browser and Operating System
Outdated browsers may lack full HTTP/2 support or contain unresolved bugs related to HTTPS. The same goes for your operating system's network stack.
- Update your browser to the latest version
- On Windows,
go to Settings > Windows Update
- On Mac,
go to System Preferences > Software Update
7. Inspect the Network Layer (For Advanced Users)
If you have access to server logs or tools like Chrome DevTools or Wireshark, look for unusual behavior:
- Use Chrome DevTools (F12 > Network tab) to monitor failed requests and HTTP response headers
- Check if the status code is
502
,503
, or if you see frame-level errors (likeRST_STREAM
)
If you’re using Cloudflare, try:
- Disabling HTTP/2 on Cloudflare temporarily
- Bypassing Cloudflare by pointing your domain directly to your origin server for testing
Bonus Tip: Fallback to HTTP/1.1 (Temporarily)
If HTTP/2 errors persist and you need the site up immediately, consider falling back to HTTP/1.1 while debugging.
In Apache:
apache
Protocols http/1.1
In Nginx:
Remove http2
from the listen
directive.
Note: This is just a temporary solution and should be reversed once HTTP/2 issues are resolved.
Conclusion
Encountering the ERR_HTTP2_PROTOCOL_ERROR
after enabling HTTPS can be frustrating, but it's usually solvable with a structured approach. For the most part it’s caused by SSL misconfiguration, incompatible browser extensions or HTTP/2 not working properly on your server.
First things first, check your SSL certificate, confirm the proper configuration of HTTP/2, then clean your browser’s cache, eliminate any client-side hitches. Following these steps, you can be sure to fix the issue and serve your users a secure fast-loading website.
Also Read: How to Fix ERR_SSL_BAD_Record_MAC_Alert: Common Causes & Solutions