Our website mysite.com is going to be hosted at a server with virtual hosting (name-based) at However, the DNS records are currently pointing to

I want to keep those DNS records pointing to while testing; is there any way for me to access anyway?

Since the target server uses virtual hosting, I cannot simply enter the IP address to test on the target site. Also, I have no control over the target server, and can therefore not set up a subdomain to test on.


Put the host names with appropriate IP address in your hosts file (/etc/hosts in Linux, %SYSTEMROOT%\System32\Drivers\etc\hosts on Windows systems) like this:

# IP address of your test host     FQDN of your domain                        www.mysite.com

Do not forget to remove the entries after testing.


As pointed out adding it to /etc/hosts is one option.

I usually use the Modify Headers Firefox Addon.
I don't have to change system configuration and become root everytime I want to test this.

Another way is using cURL like this:

curl -H "Host: mysite.com"

This is especially useful for quick troubleshooting.
And you don't have to remove anything after you are done.

  • 3
    Instead of setting the Host header (which presumably only works for HTTP, not HTTPS with SNI), you could also use the --resolv option: curl --resolve example.com:80: --resolve example.com:443: http://example.com/ – Lekensteyn Jan 25 '14 at 12:04
  • @Lekensteyn That is correct, it wouldn't work then with cURL. Wasn't thinking about SNI. – faker Jan 25 '14 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.