Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like redirect users visiting the same domain to different domains based on their locations. So for example:

  • European User -> Visits domain.com -> Forwarded to domain.eu
  • US User -> Visits domain.com -> Forwarded to domain.us

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?

Thanks!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

There are geolocation patches for DNS servers (e.g. http://www.caraytech.com/geodns/).
But this would mean that domain.com 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 domain1.com to ns1 and ns2.host.com -- But internally, I want to set Nameservers eu.domain.com for europe and us.domain.com 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

 
discard

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.