Server Fault is a question and answer site for system and network administrators. 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 host my own DNS server and would like to be able to redirect links from within the DNS server so that redirection is seamless.

Example: redirect all requests for to I'd like to rewrite the parameters as well.

IE: -->

Is this better done through a proxy server? I want to minimize the amount of custom configuration that must be done at the router level and put all the logic into the my DNS (or proxy) server.

Thank you

share|improve this question
up vote 4 down vote accepted

This is not something you can do with DNS. If you host the domain you want to redirect then Apache+Mod-rewrite would be my suggestion, if not, then a Squid proxy would be how I'd tackle the problem.


share|improve this answer
Both are good suggestions. – mcandre Jun 21 '10 at 16:06
Thanks, Bart. Is it possible to redirect traffic through a proxy server at the router level (say a cheap linksys or netgear)? I'd like to not have to configure each client browser individually. – Jackson Jun 21 '10 at 16:28
You can put the proxy inline with the router or use DHCP to set it as the default gateway. Do a search on "Transparent Proxy" for other suggestions on how to do this. – matthew Jun 21 '10 at 17:05

You can have Bind return a zone record that points to your server (named.conf):

zone "" {
    type master;
    file "/var/named/";

/var/named/ :

 $TTL    604800

Then from your web server, you will have to create a DNS record that acts as Once you have that, a simple apache redirect should be able to move all the traffic to google or wherever.

share|improve this answer

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.