[Resolved] How to find hrflang / how to set up canonical url ?
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is trying to find hreflang tags in the code and set up a canonical URL so that for both domains, it always shows the right domain. They are unsure how to locate hreflang in the code and how to configure a canonical URL for both domains to display the correct domain. Solution: We explained that if the content is duplicate or exactly the same and in the same language, it is expected that the canonical URL shows the default language/domain. This approach helps avoid penalties from Google for indexing and ranking the same duplicated content, which is considered a bad practice. For further guidance on managing duplicate URLs and canonical tags, we recommend checking these resources:
If this solution does not seem relevant or is outdated, or if it does not apply to your case, please feel free to open a new support ticket. We also highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am trying to find hreflang in the code and set up a canonical URL so that for both domains, it always shows the right domain. The site I need help with is hidden link and hidden link
Symptoms:
I am unsure how to find hreflang in the code and set up a canonical URL.
Questions:
How do I find hreflang in the code?
How do I set up a canonical URL for both domains to show the correct domain?
I checked your information, as well as the source code on your website (both versions: .de and .at). On a first analysis, it looks that the website is behaving as expected.
Since you have two versions of German, it's necessary that both pages have the same canonical, so search engines don't identify your pages as duplicate content. Your current canonical settings respect that (on both pages, the canonical is .at). That avoids duplicate content penalization.
If you want to change the canonical, that must be done via Yoast (I imagine that's the plugin you're using, since we don't have your debug information), and is not included in the scope of WPML's support.
Let me know if you have any questions regarding WPML.
Hello, i think i found the best descriptiion of my problem, and i am trying to find the solution for this exact problem hidden link and would like to know how to solve this.
Yes i have two versions of german because i have two different domains per lang, and you are saying that if i "duplicate" the content on domain1 to domain2, the canonical on domain2 should be the same as domain1 ?
The problem si that our clients SOE specialist is saying that this is wrong and both domains need to have their own canonical, yet you are saying that the "duplicated" content must show to the original content...
So at this point i dont know who is right or wrong i just need to solve this.
Lucas is OFF today and I will cover for him, hope that is okay.
As Lucas said, it is expected that canonical shows default language / domain if you content is duplicate / exactly same and in same language, this is expected as otherwise you might get penalized by Google for trying to index and rank for same duplicated content, this is considered bad practice. I have checked further online and this confirms my opinion:
- hidden link
- hidden link
You want to have different canonical when you want to rank and index both websites, but this can cause issues and troubles with SEO, as same duplicate content across website is considered bad practice, so this way with same canonical you are saying to Google, "yes I know this is duplicate from this original page, please consider main page as correct version and this is just technical copy for other reasons."
Maybe we have not understood your case correctly, feel free to get back to us with more information.