Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our website 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.

share|improve this question
Use nc netcat and submit a request manually? Use check_http – Zoredache Jan 25 '14 at 10:48
up vote 9 down vote accepted

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              

Do not forget to remove the entries after testing.

share|improve this answer

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:"

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

share|improve this answer
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 --resolve – 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 posting your answer, you agree to the privacy policy and terms of service.

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