Background of the issue:
I am developing a site and need help with creating dedicated URLs, canonical tags, and proper hreflang markup for Spanish content. Currently, the Spanish content is sharing URLs with the English content.
Symptoms:
The site is not creating dedicated URLs, canonical tags, and proper hreflang markup for Spanish content. All content is sharing the URL with English content.
Questions:
How can I create dedicated URLs for Spanish content using WPML?
What steps should I follow to implement canonical tags for Spanish content?
How do I set up proper hreflang markup for Spanish content in WPML?
Thank you for contacting WPML support. I'll be happy to help you with this. Have you translated the content to Spanish yet? once the content is translated, the translations will have their own dedicated URL, based on the preferences you selected at WPML -> Languages. The hreflang and canonical URLs will also be set automatically once you translate the content.
If you have already translated content and are not seeing these, then please send me the URL to the English page as well as the URL to the Spanish page and i'll be happy to look further into this for you.
Good morning. Ok, I will send you a sample page. It is a lot of pages, but I will send you one sample. Also, is their a way to fix this for all the pages that have already been translated that do not have a unique Spanish hreflang and canonical URL?
I can't really suggest a fix because I can't yet see what is wrong. Please share a link to a page where I can see the issue as well as a screenshot of what you are seeing in the hreflang that is incorrect. Then I can troubleshoot and try to find the issue and a solution.
This is a critical SEO issue that may be directly impacting our English search visibility—especially for blog content targeting U.S. traffic.
If we don’t fix this soon:
• Google will continue prioritizing Spanish content.
• Our English rankings may continue to decline or fail to grow.
• We risk losing relevance in our primary market (English-speaking U.S. users).
Moving forward, we need to:
• Pausing all Spanish translations via WPML.
• Rebuilding the Spanish content structure with dedicated URLs, canonical tags, and proper hreflang markup.
• Ensuring each language version is treated by Google as a standalone, legitimate, indexable page.
URL Samples:
They translate to Spanish on the URL based on the user's browser settings....
It does it on the same url...That content needs to live on a unique Spanish URL...
Not sure how WPML does the translation...I assume it’s doing it via java script or some other setting. Please let me know.
I inspected the code and this is what I see for hreflang, which looks correct to me:
<link rel="alternate" hreflang="en" href="hidden link" />
<link rel="alternate" hreflang="es" href="hidden link" />
<link rel="alternate" hreflang="x-default" href="hidden link" />
I checked both URLs and the English shows English content, and the Spanish shows Spanish content. My apologies if I am misunderstanding the issue, but I don't see what is wrong with these URLs.
If the issue is that the URL is redirected to Spanish based on the browser language setting, this is a setting in WPML -> Languages that you can disable in the Browser Redirect settings.
Please let me know if you have any further questions or if I am missing the issue, a screenshot of what is wrong and what you are expecting to show would be helpful.