TL;DR
Allowing HTTP connections with certificate errors is generally not recommended due to security risks. However, if absolutely necessary (e.g., for testing or legacy systems), you can configure your browser or system to bypass these warnings. This guide explains how to do this safely and temporarily.
Understanding the Risks
Certificate errors mean that the website’s security certificate is invalid, expired, or doesn’t match the domain name. Ignoring these errors can expose you to:
- Man-in-the-Middle Attacks: Someone could intercept your communication with the website.
- Data Theft: Your sensitive information (passwords, credit card details) could be stolen.
- Malware Infections: You might download malicious software.
Only proceed if you understand these risks and have a compelling reason to bypass the warnings.
Methods for Allowing HTTP Connections
1. Chrome
- Type
chrome://flags/#allow-insecure-localhostinto your address bar and press Enter. - Enable the "Allow invalid certificates for resources loaded from localhost" option.
- Restart Chrome when prompted.
Important: This only applies to localhost connections, which are typically used for local development.
2. Firefox
- Type
about:configinto your address bar and press Enter. - Accept the risk and continue (you'll see a warning message).
- Search for
security.tls.insecure_fallback_hosts. - Double-click on the preference to add the domain name(s) you want to allow as a string value. Separate multiple domains with commas (e.g.,
example.com,subdomain.example.com). - Restart Firefox.
Important: Be very specific about the domains you add here. Avoid using wildcards unless absolutely necessary.
3. Microsoft Edge
- Type
edge://flags/#allow-insecure-localhostinto your address bar and press Enter. - Enable the "Allow invalid certificates for resources loaded from localhost" option.
- Restart Edge when prompted.
Important: This only applies to localhost connections.
4. Command Line (curl)
If you're using the command line tool curl, you can use the -k or --insecure flag:
curl -k https://example.com
Important: This bypasses certificate verification for that specific command only.
5. Python (requests library)
When using the requests library in Python, you can disable SSL verification:
import requests
response = requests.get('https://example.com', verify=False)
print(response.status_code)
Important: This is highly discouraged for production code. Only use this for testing purposes.
Reverting the Changes
Once you've finished your task, it’s crucial to revert these changes to restore security:
- Chrome/Edge: Disable the "Allow invalid certificates for resources loaded from localhost" flag.
- Firefox: Remove the domains from
security.tls.insecure_fallback_hostsor set it back to its default value (empty string).

