Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is facing an issue where the canonical URL of the translated pages is not being copied over on pages translated for BetterDocs, unlike normal posts where setting the canonical URL value on the source page copies it to all translated pages.

Solution:
If you're experiencing issues with canonical URLs not being copied to translated pages in BetterDocs, it's important to understand that canonical URLs are typically used for posts or pages with similar content within the same language. For content available in multiple languages, the hreflang attribute is used to inform search engines about the different language versions of a page. We use the hreflang attribute to link all available translations to the original content, which prevents them from being treated as duplicates by search engines.

In the case of multilingual content, each language's canonical URL should point to itself, as each translation is considered a separate post. Therefore, it is not necessary to add a canonical URL for each translation if there are no duplicates within the same language. For more information on canonical URLs and hreflang, you can refer to the following guides:

If this solution doesn't seem relevant to your situation, please don't hesitate to open a new support ticket with us here.

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.

This topic contains 1 replies, has 2 voices.

Last updated by Mohamed Sayed 1 year, 8 months ago.

Assisted by: Mohamed Sayed.

Author Posts
January 8, 2024 at 12:47 pm #15160431

moritzU-3

Hi, the problem is that the canonical URL of the translated pages is not copied over on pages translated for BetterDocs. On normal posts, I can set the canonical URL value on the source page (English) and all translated pages will have the same canonical URL.

You can see this in action on the pages:
- hidden link
- hidden link

However, if you look at
- hidden link

This is not the case

January 8, 2024 at 3:17 pm #15161186

Mohamed Sayed

Hi,

According to Yoast SEO docs, Canonical URLs are used when you have posts or pages on your site with similar content. For example, you could have products or content that can be found on multiple URLs like visiting the same product from different categories (hidden link)

For similar content in multiple languages, the hreflang attribute is used to tell Google about the available translations for posts. Please check this guide for more info: hidden link

Kindly note that WPML uses the hreflang to link all available translations to the original content so it's not handled by the search engines as duplicate. I checked the posts and the Betterdocs pages and both show that it's implemented correctly, please see here hidden link

When you use rel=canonical in combination with hreflang, each language’s canonical points to itself because the translation is handled as a different post. Please check here: hidden link

This means that what you see with Betterdocs canonical is expected, I don't think that you need to add a canonical URL for each translation if they don't have duplicates in the same language.

Kind regards,
Mohamed

January 9, 2024 at 9:40 am #15163641

moritzU-3

Thanks a million for the clarification. I got confused by the Google Webmaster tools, but it turns out that it was for a translated page that has the identical content for different languages.

Best regards,
Moritz