Sometimes it is convenient to set a dns hostname so you can for example test your reverse proxy without having to set a dns record.

The below command will request an answer from the server listening on

curl --header "Host:"

Be aware that the above command will overwrite the Host header for the request even redirects. If you want to use it with ssl you need to add -k to skip the certificate validity check.

If you want to spoof the DNS and also check the certificate validity you can use the curl --resolve parameter.

curl --resolve ""

The --resolve parameter will spoof a dns lookup.