Question

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

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top