How to prevent the generation of multiple URLs for a product?

  • Posts: 133
  • Thank you received: 6
2 years 5 months ago #344581

Hi
I have a problem with the url of my products.
For example, I have a product in Hikashop with the ID 6248 and the name Apple 14 Pro max.
This product is available with all these URLs:

sitename.com/shop/iphone/ip14/iphone-14-pro-max/6248-apple-iphone-14-pro-max
sitename.com/shop/iphone/iphone-14-pro-max/6248-apple-iphone-14-pro-max
sitename.com/shop/iphone-14-pro-max/6248-apple-iphone-14-pro-max
sitename.com/shop/6248-

It is available even if I write a meaningless phrase after the product ID:

sitename.com/shop/6248-blablabla

Besides all these things, if my product is in several categories, it is also available in different categories with different URLs, even if it has canonical.
How to prevent the generation of multiple URLs for a product?

Last edit: 2 years 5 months ago by levelup.

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 5 months ago #344582

Hi,

If you have the canonical URL filled and you want to use it on all the listings, you can activate the "force canonical URLs on listings" setting in the HikaShop configuration.
However, it's normal that you can add stuff to a URL and it still works.
For example, take www.google.com/ ?
You can add whatever you want to it and it will still work and display the same thing: www.google.com/?test
And you'll find the same thing for Joomla articles and basically anywhere online as long as what you add to the URL is still valid according to the SEF rules of the website ( www.google.com/test wouldn't work for example ) etc.

Please Log in or Create an account to join the conversation.

  • Posts: 133
  • Thank you received: 6
2 years 5 months ago #344607

Hi
I know after the ? sign Whatever we write, the same page comes. But none of the above links have a ? sign.
Also, the first link was actually a canonical link:

sitename.com/shop/iphone/ip14/iphone-14-pro-max/6248-apple-iphone-14-pro-max

I expect that when I set up a canonical link for a product, all other links:

sitename.com/shop/iphone/iphone-14-pro-max/6248-apple-iphone-14-pro-max
sitename.com/shop/iphone-14-pro-max/6248-apple-iphone-14-pro-max
sitename.com/shop/6248-
sitename.com/shop/6248-blablabla

will redirect to the original link. But this does not happen.

Last edit: 2 years 5 months ago by levelup.

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 5 months ago #344614

Hi,

That's not what a canonical URL does. When you enter a canonical URL in a product, it adds the canonical head tag in the header of the product detail page. That way, regardless of which URL you use to access the product page, you're telling search engines that these are all the same page and to only index the canonical URL for all these URLs. That way, you won't get penalized, SEO-wise.

What the "Force canonical URLs on listings" setting does is that on products listings, instead of generating dynamically the URL of the product detail page, it will directly use the canonical URL. That way, your users will only see that canonical URL and will use it to access the product page.

So with both of these, you've convered all your bases:
- search engines will only index the canonical URL
- users will only see the canonical URL
So yes, you can still access the page with different URLs if you enter them directly in the address bar of your browser, and no, there is no automatic redirection to the canonical URL, but why does it matter to you ?

The following user(s) said Thank You: levelup

Please Log in or Create an account to join the conversation.

  • Posts: 133
  • Thank you received: 6
2 years 5 months ago #344690

Hi
Unfortunately, other product URLs are also indexed in the Google search console. I don't know how, it happened anyway. I am looking for a solution so that the products are opened only in the canonical URL and other URLs are redirected. In Joomla, redirection does not happen until a page fails. Therefore, using the redirect component is not an answer either.

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 5 months ago #344697

Hi,

Then, there is only two possible causes :
- the wrongly indexed URL was indexed before you entered the canonical URL for that product. It should sort itself out automatically after a while or you can request Google to reindex the URL.
- you have several canonical head tags on your product pages. The one added by HikaShop and a wrong one added by something else, and this messes with Google's indexing. From experience, I know that this can happen with the SEF system plugin of Joomla. So if you have it activated, try turning it off. But the first thing would be to check the headers of a product detail page with the issue to check if you see several canonical tags or not.

The following user(s) said Thank You: levelup

Please Log in or Create an account to join the conversation.

  • Posts: 133
  • Thank you received: 6
2 years 5 months ago #344711

Thank you for your answer.
I have already checked the header of several products. They don't have the extra canonical tag problem.
Which URL should be re-indexed to remove the extra urls? Wrong URLs or correct URL? Unfortunately, I do not have good information about this.

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 5 months ago #344714

Hi,

You need Google to recrawl the invalid URLs. The valid URL is already ok and Google won't know that the invalid URLs are the same as this URL until it reindex the invalid URLs and see the canonical URL tag pointing to the correct URL.

developers.google.com/search/docs/advanc...sk-google-to-recrawl

The following user(s) said Thank You: levelup

Please Log in or Create an account to join the conversation.

Time to create page: 0.221 seconds
Powered by Kunena Forum