Change8
Error1 reports

Fix HostChangedError

in Requests

Solution

The "HostChangedError" in requests usually arises when the TLS connection's hostname verification fails because the server certificate doesn't match the requested hostname. To resolve this, ensure the hostname you're requesting precisely matches a Subject Alternative Name (SAN) or the Common Name (CN) in the server's certificate. If you're connecting to a server via IP address, especially HTTPS, either update the server certificate to include the IP address in SAN or temporarily disable hostname verification (which severely degrades security and should only be done for testing purposes).

Related Issues

Real GitHub issues where developers encountered this error:

Timeline

First reported:Feb 16, 2025
Last reported:Feb 16, 2025

Need More Help?

View the full changelog and migration guides for Requests

View Requests Changelog