I develop web page which had HSTS turned on. Now I want to get rid of it. There's plenty howtos on internet except non of them works for me.
I tried
https://msutexas.edu/library/clearhsts.php#chrome-hdg-0
http://classically.me/blogs/how-clear-hsts-settings-major-browsers/
Mozilla forums (lots of pain) and others
In firefox: I did forget about the site. I cleaned whole history.
In chrome I tried with new profile, I tried chrome://net-internals/#hsts, but there is note about preloaded entries:
I understand motivation for HSTS, but right now I need it gone.
EDIT:
I tried everything and nothing worked. I checked that my site is not sending any HSTS headers(used empty nginx). As last resort I used live linux to boot fresh and and i got HSTS again.
So obviously, there must be a list of HSTS sites shared among browsers and then i finally found https://hstspreload.org/ which explain a lot.
My my site got HSTS injected from cloudflare.com proxy. I don't remember how I set the preload flag, but its there. Now I can only access the site with 'thisisinsecure' from chrome.
Importing self signed certificate is not working. I generated one with correct common name and Firefox still says 'The certificate is not trusted because it is self-signed.' It should be trusted, because i generated it. At least the choice should be mine.
setting max-age=0 did not work, I think because the certificate itself is not trusted
I'll try to import Certificate Autority

It seems this SO answer has what you need - at least for Google Chrome.
Your issue is that your site, it seems, is sending Strict-Transport-Security headers, which will be cached.
Alternatively, you can alter the site you are developing for and add a max-age directive of 0 to your HSTS header, such that the header is immediately expired. This will remove the header from the cache of any browsers visiting the site. You would then remove the header from your solution to permanently disable it.
EDIT: It seems Chrome now has a nice UI for this, allowing you to check and remove items from the HSTS cache - enter
chrome://net-internals/#hstsinto your browserFirefox has a different method, you will need to
Edit 2: If this does not work, you can remove the HSTS keyfile as described in this post - key instructions repeated below