Hello Team,
I have a news listing page that uses the Search Results, Search Bar, Category Facet, and Blueprint widgets.
When I check the page source for the following URLs:
the canonical URLs are correctly generated as:
http://localhost:8080/en/news
http://localhost:8080/ar/news
However, when I access the paginated URL:
/en/news?delta=12&start=1
/ar/news?delta=12&start=1
the canonical URLs remain the same as the base pages:
http://localhost:8080/en/news
http://localhost:8080/ar/news
This is causing an issue with SEMrush, which reports the following error for news listing pages with query parameters:
330 hreflang conflicts within page source code
Could you please advise on the correct approach to handle the canonical and hreflang URLs for paginated news listing pages with query parameters and resolve this issue?
2 Answers
2
Hi @mahmoud.khalil, this is how canonical URLs work today in Liferay, so this is a limitation of the current design. Supporting it properly would mean adding a way to define which parameters should be kept in the canonical URL. That could be an allow list in the page’s SEO settings, a global configuration, or both.
That is a new feature, not a small fix, and before we prioritize it we need to know if this is a recurring need.
Thanks!
Hi @Javier_Burgueno,
Thank you for the clarification.
I’ve attached a screenshot from SEMrush showing the hreflang conflicts affecting our news listing pages with query parameters.
I tried implementing a custom OSGi module using LayoutSEOLinkManager to include these parameters in the canonical URLs manually. Would this be a valid approach to address the issue?
Additionally, this issue affects a client with an active Liferay license. If we open a support ticket through the client’s account, would it be possible for your team to provide a hotfix?
Thanks for your support!