-2

I'm having trouble understanding how certain websites use various domains for each website. In a nutshell how does say for instance myspace have uk.myspace.com, fr.myspace.com etc?

Do they put the main files in the above root then have individual sub domains for each country or do they have something weird going on in terms of country detection??

I cant find anything anywhere online?

thanks

  • This question is interesting. Part of the answer would be that many domains can point to the same host, and this host then can decide which data to display to the user depending on the domain-name. In apache this can be achieved by ServerName www.mydomain.bla.com (and much more things to follow) – pbhd Nov 25 '12 at 22:16

1 Answers1

0

There is unlikely to be a single server involved, so talking about "files above the root" is meaningless. You'll be talking about some kind of fairly advanced routing infrastructure hiding dozens of different servers across many different locations. The routing logic is the part that decides which group of machines will be responsible for handling a given request.

The forwarding part is indeed "weird country detection", in the sense that some machine is responsible for performing an IP lookup and redirecting the user to an appropriate (possibly-geographically-closer) host. This might be done for performance reasons, or it might be done for content localisation and SEO reasons (e.g., the default language).

Gian
  • 13,735
  • 44
  • 51