Want more timely Centmin Mod News Updates?
Become a Member

SSL How can i preview a website if it is using HSTS ?

Discussion in 'Domains, DNS, Email & SSL Certificates' started by pamamolf, Mar 13, 2019.

Tags:
  1. pamamolf

    pamamolf Premium Member Premium Member

    3,842
    377
    83
    May 31, 2014
    Ratings:
    +722
    Local Time:
    10:18 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello

    How can i preview a website if it is using HSTS as the browser will not allow me to accept the invalid server certificate?

    I am getting this when i am editing my hosts file:
    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,172
    10,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,922
    Local Time:
    5:18 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Tried using Chrome/Opera web browsers too ? HSTS is telling browsers to use HTTPS connections for domain.com and any *.domain.com subdomain as well depending on configuration of including subdomains or not

    see Enabling HSTS for SSL for specifics
    But you can just clear your web browser's HSTS record for the domain.com and host.domain.com so the web browser no longer redirects from HTTP to HTTPS if you want to temporarily disable HSTS while previewing a domain under HSTS. I posted a thread at SSL - How to clear HSTS browser cache | Centmin Mod Community specifically for this :)
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,842
    377
    83
    May 31, 2014
    Ratings:
    +722
    Local Time:
    10:18 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    It doesn't work on a new browser that i was never use to open that domain....

    So maybe i must disable hsts for a while....

    Thanks