Struggling with Microsoft Edge forcing HTTPS and refusing your self-signed certificate during local development? Discover effective workarounds to resolve the issue and get back to coding.
---
This video is based on the question https://stackoverflow.com/q/66552431/ asked by the user 'Steve' ( https://stackoverflow.com/u/618157/ ) and on the answer https://stackoverflow.com/a/66967484/ provided by the user 'Steve' ( https://stackoverflow.com/u/618157/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Microsoft Edge forcing HTTPS and refusing a self-signed certificate
Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
Introduction: The Frustration of HTTPS in Local Development
As a developer, dealing with local environments can sometimes become a real headache. Recently, I faced an issue in Microsoft Edge that reminded me of the challenges that come with using HTTPS and self-signed certificates. This article dives into the problem of Edge refusing to load a site due to an SSL error, specifically the NET::ERR_CERT_COMMON_NAME_INVALID, and shares solutions to help you overcome this hurdle.
What Happened?
While working on several local sites on my Windows 10 PC, I encountered a sudden roadblock. One of my sites stopped loading in Microsoft Edge, even though others were functioning properly. The message displayed was concerning:
[[See Video to Reveal this Text or Code Snippet]]
HSTS stands for HTTP Strict Transport Security, and it can sometimes haunt local developers when using self-signed certificates. Despite removing the HTTPS redirect from web.config and creating a new self-signed certificate, Edge continued pushing for an insecure connection, leaving me at a standstill.
Understanding the Problem: HSTS and Self-Signed Certificates
What is HSTS?
HSTS is a security feature that forces web browsers to connect to a server using HTTPS to enhance security. Once a site is declared as HSTS by the server, the browser remembers this setting and will not allow plain HTTP connections. This can be problematic during local development, especially when self-signed certificates are involved.
Why This Occurred?
Even after removing the HTTPS redirect, Microsoft Edge retained the HSTS setting for the specified site. Unlike other browsers, Edge tends to hold onto its HSTS settings, complicating development with self-signed certificates. So, every time I attempted to access my site, Edge blocked it, despite the absence of HSTS configured in the web.config file.
Solution: Bypass the SSL Issue in Microsoft Edge
While it can be frustrating, there are ways to address the issue of Microsoft Edge forcing HTTPS with a self-signed certificate. Here are methods you can utilize to resume your development workflow effectively:
Quick Bypass Method
For a quick fix, there is a simple command that you can use within the browser:
Open Your Site in Edge: Attempt to load your problematic local site.
Type thisisunsafe: Click anywhere within the browser window and type thisisunsafe. This phrase acts as a bypass allowing you to ignore the SSL warning temporarily.
Further Troubleshooting Steps
If the quick fix doesn’t address your issues, consider the following:
Clear HSTS Settings: Use Edge's internal settings to delete HSTS entries:
Navigate to edge://net-internals/# hsts
Input your domain and delete the corresponding entry.
Check Web.config Settings: Ensure there are no lingering HTTPS redirects present that could be interfering with your attempts to load the site.
Use Alternative Browsers: If all else fails, remember that Chrome and Firefox do not exhibit the same problems, so you can continue your development work there.
Conclusion
While issues with Microsoft Edge and self-signed certificates can be frustrating, knowing how to maneuver around them can save you time and headaches. The quick command thisisunsafe provides a valuable temporary solution for developers needing immediate access for local testing. Additionally, clearing HSTS settings and checking your configuration can help ensure smoother sailing as you work on your web projects.
With these strategies in your toolkit, you can continue focusing on what really matters: building and deploying your applications!
Nesta página do site você pode assistir ao vídeo on-line How to Bypass Microsoft Edge’s HTTPS Issues with Self-Signed Certificates: A Developer's Guide duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário vlogize 28 Maio 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 384 vezes e gostou like espectadores. Boa visualização!