Remove the ‘lang=’ attribute from the page’s URL or allow choosing other URL formats.
2 Likes
Hello there and welcome to the Community, @user17714
Thanks for the idea! We’ll keep it in mind and see what others think about it
1 Like
Hi @user17714
Why would that be so important or what are the benefits?
1 Like
Hi Sina
Thanks for your question.
Using URL parameters (e.g., ?lang=es
) for localization can be a straightforward and quick method, but it has some significant drawbacks when compared to subdomain (es.example.com
) and subdirectory (example.com/es/
) methods:
1. SEO and Indexing
- URL Parameters: They can be problematic for search engines, as search engines might treat pages with parameters as duplicates of the original page, potentially ignoring them. This means less visibility for each language version and missed opportunities for users searching in different languages.
- Subdomains and Subdirectories: These approaches offer distinct URLs for each language version (e.g.,
es.example.com
orexample.com/es/
), making it easier for search engines to index these pages as separate entities. This approach improves search ranking in different languages and regions, helping each version rank independently.
2. User Experience and Accessibility
- URL Parameters: When users switch between languages, the parameter might disappear if the user navigates through other pages, or they might have to repeatedly select their preferred language, leading to a less seamless experience.
- Subdomains and Subdirectories: These methods tend to provide a more intuitive experience, as users can directly access the right language version by going to a specific URL. For example,
es.example.com
is more intuitive for a Spanish-speaking audience, and users are less likely to experience unexpected language switches.
3. Link Sharing and Social Media
- URL Parameters: When sharing links with parameters on social media or in messaging, the parameter may sometimes be stripped out or ignored, leading to a loss of language-specific context.
- Subdomains and Subdirectories: Sharing a URL with a clear language indicator, such as
es.example.com
orexample.com/es/
, is more reliable, and the intended language is more likely to be maintained.
4. Geotargeting and Analytics
- URL Parameters: It’s harder to target specific regions or languages in Google Analytics and Google Search Console with parameter-based localization. You might not have granular control over language versions for different regions.
- Subdomains and Subdirectories: These methods allow for clearer geotargeting, providing easier analytics segmentation based on language or region. This is especially beneficial for sites targeting specific countries or regions in their native languages.
5. Implementation and Scalability
- URL Parameters: This method is often easier and faster to implement for small sites with limited resources, as it doesn’t require as many changes to the site structure.
- Subdomains and Subdirectories: Although these methods might be more complex to implement initially, they scale better with growing language requirements. It’s easier to add new languages without altering the entire URL structure, which can be beneficial for large or expanding sites.
In summary:
- For SEO and long-term scalability, subdomains and subdirectories are generally better.
- For ease of implementation in smaller projects, URL parameters can work, but they may sacrifice some user experience and SEO advantages.
3 Likes