How to clear the HSTS cache for a site in Chrome
Jul 17, 2025 am 12:25 AMTo clear the HSTS cache in Chrome, visit the chrome://net-internals/#hsts page, find the "Delete domain security policies" section, enter the target domain name and click "Delete". 1. Open Chrome's HSTS management page; 2. Enter the domain name in "Delete domain security policies" and delete it; 3. Test whether it is successful and try to access the website through http://. Note: This operation only deletes the HSTS rules for specific domain names. If you revisit the website via HTTPS, the browser may enable HSTS again. For unreachable sites, try another browser, invisible mode, or local test domain names. If you need to reset thoroughly, you can restore the default settings via chrome://settings/reset, but all relevant data will be cleared.
If you're dealing with an HTTPS issue or switching a site from HTTPS to HTTP (maybe for testing), clearing the HSTS cache in Chrome might be necessary. Unlike regular cookies or cache, HSTS settings are stored separately and can't be cleared through normal browser data tools.

How HSTS Works Briefly
HSTS (HTTP Strict Transport Security) is a web security policy mechanism that tells browsers to always use HTTPS when connecting to a particular website. Once a browser "learns" this rule — usually after visiting the site once — it enforces HTTPS even if you type http://
. This improves security but can cause problems during development or testing.
Chrome has its own internal way of managing HSTS, which means you can't just click a button to clear it. You need to go into Chrome's special settings.

Step-by-Step: Clearing HSTS Settings in Chrome
-
Open Chrome's HSTS Management Page
Type this exact URL into your address bar:chrome://net-internals/#hsts
-
Delete a Specific Domain
- Scroll down to the "Delete domain security policies" section.
- In the input box, type the domain name you want to remove (eg,
example.com
). - Click "Delete" .
Test if It Worked
Try visiting the site usinghttp://
instead ofhttps://
. If it loads without automatically redirecting to HTTPS, then the HSTS entry was successfully removed.
Note: This only removes the HSTS rule for that specific domain. The next time you visit the site over HTTPS, the browser may re-enable HSTS for it.
When You Can't Access the Site Anymore
Sometimes, you might not be able to reach the site at all due to certificate issues or redirects. In those cases:
- Try using a different browser or incognito mode.
- Use another device or network where the HSTS rule hasn't been set yet.
- If you're developing locally, make sure to test on a domain that doesn't have HSTS enabled (like
.localhost
,.test
, or custom hosts).
Keep in mind that some domains (especially large services like Google or GitHub) have HSTS preloaded into Chrome. That means you can't delete them via the chrome://net-internals/#hsts
page because they're built into the browser itself.
Alternative: Reset All Network Settings (Use Carefully)
If you're troubleshooting and aren't sure which domain is causing trouble, or if you're OK with losing all HSTS settings:
- Go to
chrome://settings/reset
- Click "Restore settings to their original defaults"
- Confirm by clicking "Reset settings"
This resets many browser settings, including cookies, cache, and HSTS entries, so it's more of a broad solution.
Clearing the HSTS cache in Chrome isn't something most users need to do regularly, but it's useful when debugging local servers, reverse proxies, or SSL issues. Just remember that HSTS exists to protect users — so don't disable or bypass it unnecessarily in production environments.
Basically that's it.
The above is the detailed content of How to clear the HSTS cache for a site in Chrome. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To prevent Chrome from automatically updating on Mac, it can be done by disabling update services, modifying permissions, and restricting network access. 1. Use terminal commands to disable the GoogleSoftwareUpdate daemon to prevent background updates; 2. Modify update directory permissions to prevent Chrome from starting the update process by itself; 3. Restrict Chrome's outbound network connection through system firewall or third-party tools to further eliminate update requests. Using these methods in combination can effectively prevent Chrome from being automatically updated.

When Chrome spelling check fails, you can troubleshoot and fix it by following the following steps: 1. Confirm that the "Use Spelling Check" function is enabled and check whether the corresponding language is enabled in the language settings; 2. Adjust the input language order, delete the redundant language, and ensure that the main language enables spelling check; 3. Close possible conflicting extensions, especially syntax or translation plug-ins; 4. Update Chrome to the latest version and check the operating system updates. If it still doesn't work, try resetting Chrome settings.

To let Chrome download directly instead of opening it when clicking on the PDF link, 1. Enter chrome://settings/content/pdfDocuments to check "DownloadPDFfilesinsteadofautomatically opening theminChrome"; 2. Check whether there are plug-ins such as Lightpdf or Smallpdf interfering behavior, you can try to disable the test; 3. You can use the developer tools to copy the link and paste the new tag to trigger the download. The above methods can be selected according to the situation.

The problem of Chrome sync stuck can be solved through the following steps: 1. Check the network connection and Google account status to ensure normal access; 2. Log out and log in to the Chrome account again; 3. Clear the synchronized data and restart the browser; 4. Reset Chrome settings; 5. Try the traceless mode or new user profile. Sequentially checking can effectively restore the synchronization function.

The screen tear occurs when the Chrome browser scrolls, which is usually caused by the out-of-synchronization of rendering and refresh. The solutions are as follows: 1. Ensure that hardware acceleration is enabled, you can manually check the settings and restart the browser; 2. Forcefully enable Compositor and related options to optimize rendering; 3. Check the display refresh rate, use single-screen testing, and enable VSync or adaptive synchronization technology on supported devices; 4. Update the graphics card driver or replace the display interface such as using the DP interface. It is recommended to start the troubleshooting with simple steps and gradually adjust to find the best configuration.

The problem of Chrome automatically popping up new tabs is usually caused by malicious extensions, advertising scripts, or browser hijacking. The solutions are as follows: 1. Check and uninstall suspicious extensions, especially ad-class plug-ins; 2. Clear browser caches and cookies to eliminate data corruption; 3. Check whether the homepage and default search engine settings have been tampered with and manually corrected; 4. Use antivirus software such as WindowsDefender or Malwarebytes to scan and clear potential malware; 5. Finally, try resetting Chrome settings to restore the default configuration. Troubleshooting in this order can effectively solve most abnormal labeling problems.

1. Check whether the shortcut attribute has additional parameters and delete it; 2. Clear cache and switch startup settings, or create new user information; 3. Extend the impact and disable the problem plug-in through traceless mode. Chrome pops up new windows instead of tabs usually due to exceptions in shortcut parameters, cache configuration conflicts, or third-party extension interference. Check and adjust the corresponding settings in turn to resolve.

Chrome printing exceptions can be solved in the following ways: 1. Check the printer selection, paper size, orientation, zooming and background graphics settings in the print preview; 2. Try stealth mode to eliminate extended interference and clear cache; 3. Update or reinstall the printer driver, replace the general driver or use the "Print as PDF" method; 4. Finally, you can reset the Chrome settings to restore the default. Most problems can be solved through the first few steps. If they still fail, you can export PDF to print.
