Chrome:The website uses HSTS. Network errors…this page will probably work later

后端 未结 9 1025
粉色の甜心
粉色の甜心 2020-12-07 07:12

I am developing against localhost. This morning right after I used fiddler I started getting this error on chrome (works correctly in firefox)

\"You cannot visit loc

相关标签:
9条回答
  • 2020-12-07 07:31

    I had this issue with sites running on XAMPP with private hostnames. Not so private, it turns out! They were all domain.dev, which Google has now registered as a private gTLD, and is forcing HSTS at the domain level. Changed every virtual host to .devel (eugh), restarted Apache and all is now well.

    0 讨论(0)
  • 2020-12-07 07:37

    I recently had the same issue while trying to access domains using CloudFlare Origin CA.

    The only way I found to workaround/avoid HSTS cert exception on Chrome (Windows build) was following the short instructions in https://support.opendns.com/entries/66657664.

    The workaround:
    Add to Chrome shortcut the flag --ignore-certificate-errors, then reopen it and surf to your website.

    Reminder:
    Use it only for development purposes.

    0 讨论(0)
  • 2020-12-07 07:38

    Encountered similar error. resetting chrome://net-internals/#hsts did not work for me. The issue was that my vm's clock was skewed by days. resetting the time did work out to resolve this issue. https://support.google.com/chrome/answer/4454607?hl=en

    0 讨论(0)
  • 2020-12-07 07:39

    I encounter same error, and incognito mode also has same issue. I resolve this issue by clear Chrome history.

    0 讨论(0)
  • 2020-12-07 07:41

    One very quick way around this is, when you're viewing the "Your connection is not private" screen:

    type badidea

    type thisisunsafe (credit to The Java Guy for finding the new passphrase)

    That will allow the security exception when Chrome is otherwise not allowing the exception to be set via clickthrough, e.g. for this HSTS case.

    This is only recommended for local connections and local-network virtual machines, obviously, but it has the advantage of working for VMs being used for development (e.g. on port-forwarded local connections) and not just direct localhost connections.

    Note: the Chrome developers have changed this passphrase in the past, and may do so again. If badidea ceases to work, please leave a note here if you learn the new passphrase. I'll try to do the same.

    Edit: as of 30 Jan 2018 this passphrase appears to no longer work.

    If I can hunt down a new one I'll post it here. In the meantime I'm going to take the time to set up a self-signed certificate using the method outlined in this stackoverflow post:

    How to create a self-signed certificate with openssl?

    Edit: as of 1 Mar 2018 and Chrome Version 64.0.3282.186 this passphrase works again for HSTS-related blocks on .dev sites.

    Edit: as of 9 Mar 2018 and Chrome Version 65.0.3325.146 the badidea passphrase no longer works.

    Edit 2: the trouble with self-signed certificates seems to be that, with security standards tightening across the board these days, they cause their own errors to be thrown (nginx, for example, refuses to load an SSL/TLS cert that includes a self-signed cert in the chain of authority, by default).

    The solution I'm going with now is to swap out the top-level domain on all my .app and .dev development sites with .test or .localhost. Chrome and Safari will no longer accept insecure connections to standard top-level domains (including .app).

    The current list of standard top-level domains can be found in this Wikipedia article, including special-use domains:

    Wikipedia: List of Internet Top Level Domains: Special Use Domains

    These top-level domains seem to be exempt from the new https-only restrictions:

    • .local
    • .localhost
    • .test
    • (any custom/non-standard top-level domain)

    See the answer and link from codinghands to the original question for more information:

    answer from codinghands

    0 讨论(0)
  • 2020-12-07 07:51

    I have been suffering of this issue for very long time. I was unable to open websites like GitHub. I almost tried all the answer on web and not anyone worked. Tried to reinstall chrome also. I found the solution for this from our network guy and it worked. There is a fix in registry which will resolve this error for permanent basis.

    1. Press Windows+R key to open run dialogue box
    2. type : regeditand press enter to open registry
    3. In the tree view at left click through following path HKEY_LOCAL_MACHINE > SOFTWARE > POLICIES > Microsoft > SystemCertificate > Authroot
    4. Now double click on DisableRootAutoUpdate on the right and set it to 0(zero) in the dialogue box appearing
    5. Restart your PC to apply registry changes and you will not get this error anymore

    The solution above is for Windows 8. It is almost identical in later versions but i’m not sure for earlier versions like XP and vista. So that needs to be checked.

    0 讨论(0)
提交回复
热议问题