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

I have many TLD's for my domain, for US users it's .COM, for German users it's .DE, etc. I redirect them all to the .COM domain using CNAME records. The reason is to prevent getting a penalty from Google for duplicate content.

Is there a way to still detect the TLD the user entered, so I can display the page in the right language?

share|improve this question
up vote 2 down vote accepted

If you use CNAME records, google will still regard the sites as different domains, and will penalize them for duplicate content.

You should redirect your users with a HTTP 301 response. When you do this, you can also add a query string when redirecting:

www.example.de -> www.example.com/?lang=de

This way, you won't be penalized for duplicate content, and you can detect your user's language.

share|improve this answer

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.