Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our website is currently hosted in the UK and we have very good search engine positioning on In order to achieve the same sort of success in the US, our site would have to be hosted in the US.

I have a few queries regarding this.

1) how do I set up DNS so that US traffic knows to go to the closer server?

2) Our site doesn't experience a huge amount of load yet, so for the time being, would the US server just reverse-proxy the requests to our UK server?

3) Or would we set up some sort of script which synchronises the databases on both servers?

share|improve this question
Are you saying ranking prioritises IP-addresses in the continental USA? – RedGrittyBrick Nov 5 '10 at 17:24
Google gives a slight bonus to speedy sites. Maybe this is wat Samuurai is referring to? If I had to guess, I'd assume there are more effective SEO to perform first though. – Martijn Heemels Nov 5 '10 at 17:33
up vote 4 down vote accepted
  1. DNS based on Geolocation

    • You can run bind and patch it with GeoDNS to return a different IP depending on the requester's location.

    • The alternative to running the DNS yourself is to use a provider that will let you specify the IP based on the location of the user. For example: GeoScaling

  2. Reverse Proxying

    • You can reverse proxy it. It may be slower though.
  3. Database

    • Synchronization of your database depends on the type of application you are hosting.
share|improve this answer
Brilliant.. thanks a lot for this answer.. GeoDNS is exactly what I was after. – Samuurai Nov 8 '10 at 14:33

Questions 2 and 3 depend heavily on your application. Question 1, is theoretically achievable like so:

  1. Set up the US server and a corresponding DNS server (separate) for that server.

  2. Give all the DNS servers the same IP address, including your server in the UK -- this technique is known (and widely used with DNS) as Anycast.

  3. Request that your network or colo provider announce the routes to your DNS servers via BGP so that your machines are accessible. There may be some unforeseen caveats here depending on your hosting setup.

  4. Configure each DNS server to serve the IP addresses of the site closest to it, e.g. have the US DNS server serve the addresses for the US/.com servers, and the UK DNS serve the addresses for the UK/ servers.

  5. Because of Anycast, the closest DNS server will generally always be used, and will hence return the IP addresses of the closest server.

Further considerations:

  • If you are going to replicate your site entirely, this also has the advantages of pointing US visitors to the domain to the closer server, as well as UK visitors to the .com domain to the European server (assuming you have a ServerAlias or other vhosting setup).

  • Also note that if you cannot get your network provider to announce the routes for you, this is not a feasible solution. It may be very difficult to request in a managed hosting scenario or require specialized resources from your hosting company.

  • Another note is that Anycast is a nonreliable setup for a connection-oriented protocol, but is well suited for UDP traffic like DNS.

share|improve this answer

For #1, there are plenty of tools out there to help you determine the relative location of your user:

As far as proxying vs syncing, I'm not sure if Google is sensitive to the physical location of your target server and would suspect you'd be just fine pointing both to the same destination as long as the domain name doesn't get changed while they travel the site.

share|improve this answer
Thanks for the reply..Finding the location of the user requires they're already connected to a server. What I'm trying to do is tell them which server to connect to. I'm guessing this will have to be done with some sort of load balancer if it can't be done with DNS. – Samuurai Nov 5 '10 at 15:49
Also, with the proxying, I'm pretty sure google won't know that the website is hosted in the UK because it'll be hidden behind the local (US) server. – Samuurai Nov 5 '10 at 15:49
I hear you regarding needing to already be on the server. I wonder if Google's bots would react correctly to a geolocating script though. Such as a UK-based bot going into either site, doesn't matter which, and getting directed the .uk site, and vice-versa. Self-solving problem? – PMGoldstein Nov 5 '10 at 17:28

I can see the point of mirroring the site contents to a server in the USA, and applying some localisation. Having a server in the USA ought to provide a speedier response to US customers.

Isn't reverse proxying likely to slow down the serving of dynamic content compared to just hosting your USA content in the UK?

If you are big enough, I guess you talk to Akamai.

share|improve this answer

More simple :

1/ Lease servers on several webhosting/Cloud providers around the world

2/ Install Varnish :)

3/ Use load-balancing tool (Cedexis, Dyn, etc) for balance the trafic accross network of cache servers. You can optionally redirect the Google IPs specifically to your local cache servers.

In this configuration, the traffic is send to your U.S. local caching servers. It is very simple and it can help Google crawler ;-)

It's tested and approved.

share|improve this answer
Your answer to question one doesn't really answer the question. – Lipongo Dec 26 '12 at 19:33

For #1, I think you dont need to determine the user's location by yourself, there are plenty services out there, such as

share|improve this answer

Your Answer


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.