Few people know that you can continue to use curl when your DNS is broken. Just add

—resolve host:port:ip-address

to your command line*.

*) Yes, that about all DNS does for you. Prettty lame, right?💁🏻‍♂️

@icing also great for circumventing DNS based security solutions (Cisco Umbrella).
Build your own "resolver" with ~/.curlrc to make it persistent.
@icing and you also can use this neat trick to force your request to a specific host. Very useful for testing.
@icing this is also great for overriding what DNS gives you

@icing You need to make sure to keep your rollodex with site addresses up-to-date, though q:

That said, it's also great to test VHOSTS.

@icing @bagder why is the port part of the parameters though? Seems like it could lead to confusion if mixing this and normal DNS…
@icing that definitely defeats my lame playing around with /etc/hosts
@icing Stupid dumb name resolution ...
@icing also good to check if your virtual host settings work if you are on your local dev machine
@icing I use `--connect-to HOSTNAME::REALHOST:` all the time to get directly to a host in a load balancer etc.
Makes everything work with HTTPS too!
@icing I use it a lot with dev team to show them where they are wrong on dev platform 😅
@icing curl is amazing - I love this feature for testing and troubleshooting DNS, certificates, WAF/CDN, etc.