Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I have local DNS server thats resolve all urls *.domain.tld to Also I have the production server with same address *.domain.tld. They have the same names, because subdomains are interact with each other, and I have hardcode domain urls. I cant change them in production server.

Problem is reach the production server from my developer computer with no touching dns server and /etc/hosts.

I found some options for Chrome such as --dns-server, --host-rules, but no one is working. I have Google Chrome 23.0.1271.64 and Chromium 22.0.1229.94 on Ubuntu 12.10 64-bit.

share|improve this question
What OS are you on? It's not an option to modify /etc/hosts (or its equivalent) on your computer (the one with Chrome)? – poplitea Nov 29 '12 at 10:09
You could run a local proxy with a rule to route your request as you wish. – Flup Mar 18 '13 at 14:16
Seems like --dns-server is no longer supported. – Oliver Salzburg Mar 18 '13 at 14:31
Would for example the Switcheroo Redirector extension or the Redirector extension be useful? – harrymc Mar 18 '13 at 14:48
@harrymc Those two claim to redirect HTTP requests, but I think a DNS request is something different. – Louis Mar 19 '13 at 13:45

You could use an extension to redirect a named HTTP request to one using an IP address.

This solution doesn't require any modification of the DNS or hosts file, and this redirection may possibly be enabled on and off via the extension :

Switcheroo Redirector

share|improve this answer
thanks harrymc, I think this could solve the asker's problem. I actually offered the bounty because I had the same title question, but the details were different. I want all DNS requests to go a different route. So, not just, but all the images, scripts, etc. that might be found on the page. Maybe I should ask a separate question? – Louis Mar 19 '13 at 14:28
Such an extension (if programmed correctly) should work on all the page elements, including images etc. Unfortunately, as mentioned above, I cannot test. – harrymc Mar 19 '13 at 15:04
Yes, but that's assuming all the redirects were hardcoded. I was looking for a solution that would avoid DNS leaks for general browsing when using a proxy server. It's my fault that I didn't think that there were solutions for his specific problem, and assuming there was a general solution to the title question. – Louis Mar 19 '13 at 15:14
Redirector updated link but none of this work as adding custom DNS... – cregox May 19 '15 at 14:47
@harrymc Redirector Chrome store link is not valid anymore. Maybe you want to add Requestly to the list…. – blunderboy Oct 31 '15 at 23:26

Chromium's DNS resolver is broken, and it won't respect the order in resolv.conf. So when I try to connect to hosts on my VPN, which the system resolves correctly using the VPN's DNS server, Chromium instead uses the non-VPN DNS, and resolves it to my internet provider's advertisement page (which they gratuitously reply with to any non-resolving host).

The only solution I've found was to add private IPs to /etc/hosts.

share|improve this answer

DNS Overrider

This extension allows you to override domain names inside web-pages. DNS Overrider allows you to replace a current hostname with an alias. Hostnames will be changed in tags like <img>, <script>, <a>, <link>. Only hostnames with a specified alias will be replaced.

Using DNS Overrider you can replace hostname on the fly without access to system settings such as hosts file. DNS Overrider enables you to select what rules to apply via the extension settings page.

DNS Overrider is a useful Chrome extension for website and blog developers (both front-end and back-end developers). If you work with a test version of your site, you can easily and instantly override hostnames for images, scripts, anchors, style sheets without making any changes in the code and evaluate website markup and design correctness.

DNS Overrider extension is intuitive and easy to use. Install the extension, enter an orignal hostname in the "hostname" field, then input a desired alias in the "alias" field and click the "add" button. The rule will be applied to all pages which contain any elements of the provided hostname.

share|improve this answer
This extension replaces URLs in the HTTP response body; it has nothing to do with DNS. This does not answer the question. – Spooky Dec 7 '14 at 20:50
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – DavidPostill Dec 7 '14 at 21:53

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.