Map a hostname and port to a specific IP address.
Section: Debugging and Diagnostics
Override DNS resolution
bash
bash
curl --resolve example.com:443:127.0.0.1 https://example.comExplanation
Great for testing a site before DNS changes propagate.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Debugging and Diagnostics
Redirect one host:port to another
Change where curl connects without changing the URL's host name.
Limit total transfer time
Abort the request after a fixed total duration.