What is the best SEO strategy for a symfony2 website in many languages?
I have created my routes as /{_locale}/route, like “website.com/en/test-page” and “website.com/de/test-page“.
Is this a safe and professional way to do this or should I hide the language from the url (this way it could be website.com/test-page for both languages). Or even create dns aliases like de.website.com and en.website.com ?
It is generally frowned upon to serve different versions of content from the same URL, so the standard on the web is to add a location to the URL.
The URL pattern you are describing is one of a few standard ways of handling locale/internationalization, and the best for the Symfony2 implementation. It is very common and shouldn’t have any negative impact on your SEO.
Other common methods are OK, but they each has their own issues:
Using a
get parameter (http://example.com?loc=en) is common, but not
recommended by Google, much like you would not use a get parameter
for an article name or id.
DNS aliases are another common option, but they do not jive well
with Symfony routing.