ERR_SSL_PROTOCOL_ERROR not able to see https localhost pages in chrome browser

Not able to see the localhost https page properly in chrome . It says :

**This site can’t provide a secure connection**
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

I tried -deleting domain localhost from - chrome://net-internals/#hstsBut not helped.

3

10 Answers

Try clearing your website data and cache from chrome. Old htaccess files can cause problems on localhost.

2

Instead of

localhost:8000

Write

Note: replace 8000 with your port number

0

If you're using Visual Studio

Then go to project properties => enable SSL as True and select the SSL URL with port numberShowed as per the properties

1

Changing https to http worked for me.

Go to chrome://net-internals in the Chrome and switch to the Domain Security Policy tab.

In the "Delete domain security policies" section at the bottom, write "localhost" in Domain field and press the "Delete" button.

Note, this is a temporary fix.

In my case, my antivirus was the culprit. Somehow the site was considered unsafe and it replaced the response with the 'website blocked' page of the antivirus application. This information, however, was not sent with TLS so the browser interpreted that as an ERR_SSL_PROTOCOL_ERROR

  1. I cleared Google Cache on Chrome://settings/privacy
  2. Instead of using the ' or ' I just used 'localhost:4200' and that worked well.

What worked for me was using (its DNS entry) instead of

chrome://flags -> https and then set it to enable

works to me

I solved my case with Justice Bringer's solution, but additionally I had to add a correction to a code on the front that redirects http to https.

if (window.location.protocol !== '4200') { forceHttps();
};
// force-to-https.js v1
function forceToHttps() { if (location.protocol == 'http:') { var linkHttps = location.href.replace('http', 'https'); // via location window.location.protocol = 'https:'; window.location.href = linkHttps; // via click var a = document.createElement('a'); a.setAttribute('href', linkHttps); a.setAttribute('style', 'display: none !important;'); a.click(); // reinforce setInterval(function() { window.location.href = linkHttps; a.click(); }, 3500); // via meta var meta = document.createElement('meta'); meta.setAttribute('content', '0;URL=' + linkHttps); meta.setAttribute('http-equiv', 'refresh'); (document.head || document.getElementsByTagName('head')[0]).append(meta); };
};

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like