Skip Navigation

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

Problem:
The client is concerned that the hreflang tags on their website are not including query parameters (like '?add-to-cart=159246' or '?paged=10') after the question mark in URLs.
Solution:
We explained that excluding query parameters from hreflang tags is the correct and recommended approach for optimal SEO performance. Here are the reasons:
- Hreflang Tags and Canonical URLs: Hreflang tags should point to the canonical versions of pages, intentionally excluding query parameters to avoid multiple URLs leading to the same content, which can confuse search engines.
- Preventing Duplicate Content Issues: Including query parameters could lead to search engines indexing multiple versions of the same page, potentially resulting in duplicate content penalties.
- Improved Search Engine Indexing: By pointing hreflang tags to canonical URLs without query parameters, it helps search engines recognize the primary version of each page, enhancing SEO rankings.
We recommend verifying that the canonical tags on your pages are correctly pointing to the main site without query parameters. You can check this by viewing the page source and looking for the canonical link tag. For guidance on checking canonical tags, visit this article.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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 reply, has 2 voices.

Last updated by Prosenjit Barman 2 months, 1 week ago.

Assisted by: Prosenjit Barman.

Author Posts
September 19, 2024 at 2:32 pm #16199607

tannerT

<b>Background of the issue: </b>
the issue here is that the self referencing hreflang is leaving out the context after the question mark. Here are 2x examples:

1.] view-source:hidden link

2.] view-source:hidden link

See attached screenshots

Screenshot 2024-09-19 at 10.32.44 AM.png
Screenshot 2024-09-19 at 10.33.01 AM.png
September 20, 2024 at 8:16 am #16201583

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand your concern about the hreflang tags on your website not including the query parameters after the question mark in URLs (such as `?add-to-cart=159246` or `?paged=10`). I want to reassure you that this is actually the correct and recommended behavior for optimal SEO performance.

Here's why this is beneficial:

- Hreflang Tags and Canonical URLs: Hreflang tags are designed to point to the canonical (main) versions of your pages. This means they intentionally exclude query parameters. Query parameters often create multiple URLs leading to the same content, which can confuse search engines.

- Preventing Duplicate Content Issues: Including query parameters in hreflang tags could cause search engines to index several versions of the same page, leading to potential duplicate content penalties. By linking hreflang tags to the canonical URLs without query parameters, we help search engines recognize the primary version of each page.

- Improved Search Engine Indexing: Search engines consider the canonical version as the main page to index. By ensuring your hreflang tags point to these versions, you enhance your site's clarity to search engines, which can positively affect your SEO rankings.

To ensure everything is set up correctly, you might want to verify that the canonical tags on your pages are properly pointing to the main site without the query parameters. You can check this by viewing the page source and looking for the canonical link tag. This article provides a helpful guide on how to do this:

- hidden link

Please don't worry about any warnings or errors that might appear in SEO analysis tools regarding this matter. These warnings are common and typically not a cause for concern when canonical tags are correctly implemented. Submitting your site to Google Search Console or other search engine tools should proceed without any issues.

If you have further questions or would like to discuss this in more detail, you can also consult with an SEO specialist to provide additional insights if you'd like.

Best regards,
Prosenjit

September 20, 2024 at 5:18 pm #16203901

tannerT

Wonderful reply. Great work