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'd like redirect users visiting the same domain to different domains based on their locations. So for example:

  • European User -> Visits -> Forwarded to
  • US User -> Visits -> Forwarded to

But the thing is, I don't want to use htaccess or code redirect -- I'd like it to be a DNS level or Virtual Nameserver (if something like it exists?) redirect? Hope I'm making sense? It is possible?


share|improve this question
up vote 2 down vote accepted

There are geolocation patches for DNS servers (e.g.
But this would mean that would return different records for requests from different locations, you would still need to do the redirect from .com to .us somewhere.

But this you could do then already in the destination data center.

share|improve this answer
Hmm..what I'm looking to do is say I've set the NS for to ns1 and -- But internally, I want to set Nameservers for europe and for EU and US users resp, and they should resolve to IPs. Is that possible? – Nimbuz Jul 20 '11 at 17:44

You'll have to use an HTTP level redirect - DNS on its own can't do this.

The only other way would be to use a content delivery network that can serve different content off the same domain name depending on the client's IP.

share|improve this answer
Yes, how do CDNs do it? So the concept of "Virtual Nameserver" does exist after all? – Nimbuz Jul 20 '11 at 11:52
They look at the IP, use a geolocation service to determine its origin, then serve content depending upon the location. They don't use different domains, etc. at the DNS level. – Michael Lowman Jul 20 '11 at 12:35

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.