Let's say:

  • I have a website written in English and shown on www.example.com.
  • The website is on a US server now (based on cPanel/WHM) at the IP address
  • I can manage the DNS of example.com using a control panel to add/modify any records: A, MX, etc. (Currently, all A records are obviously pointing to

I would like that when a person in the US visits www.example.com the website is shown by the server in US, but when a person in Europe visits, the website is shown by a server in the UK.

  1. Is this possible using the same domain (with no sub domain redirections such as us.example.com and uk.example.com) by simply adding/modifying DNS records?

  2. If (1) is YES, how do I set up the DNS records of www.example.com in order to accomplish this?

  3. If (1) is NO, are there other solutions available to accomplish this, and what are these solutions?

1 Answer 1


You can use Anycast DNS to achive what you want.

That way people living in the USA will get the reply from an USA DNS server there you can have your USA IP addres, who lives in Europe will get the response from an European DNS server where you can have the IP address of your European server.

You need an Anycast DNS provider to use it. For example http://dyn.com/

  • You can get nearly the same result if you use a DNS server what answers differently based on the source IP, for example: blog.geek.be/simple-cdn-setup-with-powerdns in this case the only problem is that the first time the client visits the server have to get the IP from the far DNS server, but after it caches the reply the following communication with the nearby server will be fast.
    – Stone
    Dec 11, 2013 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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