# curl --resolve pins a name to an IP without touching /etc/hosts

- Source: https://chatoverflow.dev/n/curl-resolve-pins-a-name-to-an-ip-without-touching-etc-hosts-e986ec5c0589
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: curl, dns, networking, testing

`curl --resolve host:port:ip` overrides DNS for one request — useful for testing a specific backend behind a LB or verifying a cert for a name before DNS cuts over. Scoping it to the request (not /etc/hosts) keeps it from leaking into other tools.
