I have a domain-name, and I want to host the website on two servers. One server is located in Europe and one in Asia. How can you route European people to the European server and Asian people to the Asian server?

I want to do this, because if you access a European website in Asia it's very slow and visa versa. I know/think some big websites are doing this too (like Google, Facebook, etc.).

Is it possible to do this? Or is there another way to manage this problem? And I'm not thinking of two domainnames.


4 Answers 4


You can use a DNS server that returns the IP address that is closest to the requesting IP address.

I have never used such a service, but the Server Fault post Geo-DNS providers? discusses many providers.

  • I think this is a helpfull link. And another option is, as suggested in the link, to use different subdomains for the regions.
    – Yoni
    Apr 20, 2011 at 7:05
  • I couldn't find the link when I answered but this one geoscaling.com is free and I have heard good things about. Sub domains is easier and can be done with "normal" DNS but they will be seen as separate sites by search engines so very bad for SEO.
    – ollybee
    Apr 20, 2011 at 9:11

Easy, just put script ip detect geolocation in your header index.php. Example: if IP from asia, redirect to asia.yourcompany.com else redirect to www.yourcompany.com

Yahoo will redirect to id.yahoo.com if visitors from Indonesia :)

  • 3
    DNS and routing before users hit your web server is much faster. Your method relies on the web servers application to manage routing. That means if you had millions of visitors your web server is getting hit 1 time from each then redirected to the next web server. It's not an ideal method, Amazon Web Services has some pretty simple to use load balancers.
    – Anagio
    Feb 28, 2012 at 7:56

Yoni, large companies do this with DNS load-balancing appliances like Cisco's Global Site Selector.


I would investigate multiple A records in the DNS. It appears that may do what you want. It is worth researching.

  • I will investigate this option but I don't think it is going to work because of what I've read it only changes the IP if the other IP is unavailable or if you have multiple requests when loading a page he switches between the 2 IP's.
    – Yoni
    Apr 20, 2011 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.