Super User is a question and answer site for computer enthusiasts and power users. 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

For testing purposes, is it possible to circumvent DNS and send an HTTP request for a certain domain name to a specific IP address?

For example, let's say you are building a website for on server

Without updating the domain's actual DNS records (e.g. through the registrar or DNS provider) or fiddling with DNS locally (e.g. updating hosts file), how can you test how would respond to an HTTP request for

share|improve this question
Would running a DNS server on your LAN count as fiddling with DNS Locally ? – Lawrence Feb 21 '14 at 1:13
this is a weird question.. HTTP request for a domain name.. well, HTTP requests are to an IP address, for webpages.. And if you're making an HTTP Request to a domain for a webpage(whatever that means!)-there is such a thing as a hosts header but it is for when one IP holds many domains,to get to that IP in the first place you'd need the IP or domain+translate to IP.The HTTP request is to an IP not to a domain. The situation would be a bit different perhaps, with a proxy server, but requests are still to IPs. So, it's hard to see what your question means or how it makes sense or what you mean. – barlop Feb 21 '14 at 15:35


First, you can issue the request by specifying the IP directly, i.e.

Second, each HTTP request includes a Host: header that tells the HTTP server what domain it wants to reach. This exists so that multiple domains can live on a single IP. So if you can find a browser extension or other tool that lets you issue a request and specify that manualy, you can do it.

I haven't used it, but some quick searching turned up a Modify Headers Firefox extension you can try.

You might get SSL certificate errors you need to bypass, if your site is HTTPS and you specify an IP for the URL as it won't have a domain name to compare to the certificate.

share|improve this answer
The problem with this is if you're wanting to test your application with subdomains, etc. – kobaltz Feb 21 '14 at 1:48


I'm not familiar with that Chrome extension but using IP addresses instead of the the DNS records that resolve to them is not a reliable means of testing website behavior. For example, the HTTP/1.1 spec introduced the idea of a Host: header, this permitted virtual hosting (multiple sites sharing an IP address, and I would argue a consequent explosion in inexpensive website hosting). My point is that if you use an IP address rather than a FQDN your browser (with exception to Chrome extension and similar) will not be generating the same headers as it would with a published DNS record, so it's not a real test in the real world.

The "typical" way to do this is exactly what you're trying to avoid: hosts files, "split" DNS, etc.

share|improve this answer

There is a Google Chrome extension called DNS Overrider that will allow you to enable a DNS override of a URL on a page. For example, if I had a local html file on my computer that IFRAME'd a url ( then I could use this extension to create an alias that points to

However, keep in mind that this will not work in your address bar. It will only work on the URLs within a page. Using the IFRAME element should work.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .