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 192.0.2.0.
- 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 192.0.2.0.)
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.
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?
If (1) is YES, how do I set up the DNS records of www.example.com in order to accomplish this?
If (1) is NO, are there other solutions available to accomplish this, and what are these solutions?
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/