How should I structure my urls for both SEO and localization?
- by artlung
When I set up a site in multiple languages, how should I set up my urls for search engines and usability?
Let's say my site is www.example.com, and I'm translating into French and Spanish. What is best for usability and SEO?
Directory option:
http://www.example.com/sample.html
http://www.example.com/fr/sample.html
http://www.example.com/es/sample.html
Subdomain option:
http://www.example.com/sample.html
http://fr.example.com/sample.html
http://es.example.com/sample.html
Filename option:
http://www.example.com/sample.html
http://www.example.com/sample.fr.html
http://www.example.com/sample.es.html
Accept-Language header:
Or should I simply parse the Accept-Language header and generate content server-side to suit that header?
Is there another way to do this? If the different language versions don't have different urls, what do I do about the search engines?