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.

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.

  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?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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/

share|improve this answer
    
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 '13 at 12:01

ccTLDs (country-code top level domain names): These are tied to a specific country (for example .de for Germany, .cn for China). Users and search engines use this as a strong sign that your website is explicitly

gTLDs (generic top level domain names): These are not tied to a specific country. Examples of gTLds are .com, .net, .org, .museum. Google sees regional top level domain names such as .eu and .asia as gTLDs, since they cannot be tied to a specific country. We also treat some vanity ccTLDs (such as .tv, .me, etc.) as gTLDs as we've found that users and webmasters frequently see these as being more generic than country-targeted (we don't have a complete list of such vanity ccTLDs that we treat as gTLDs as it may change over time). You can set geotargeting for websites with gTLDs using the

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=182192

share|improve this answer
    
Geographic target in Google webmastre tools does not allow to set EUROPE, but only specifidc countries. So I can't make people from Germany and from French and form Italy to go ALL to somedomain.co.uk, unless buying 3 country code domains. –  Marco Demaio Oct 18 '10 at 18:50
1  
This appears to be completely off topic (not an answer). It says nothing about DNS and does not appear to address the question. Furthermore, it is entirely a quote, and a badly formatted one at that: no blockquote indicators, and both paragraphs stop half way through a sentence. –  TRiG Dec 4 '13 at 11:17

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.