Remove component/hikashop from product URL

  • Posts: 60
  • Thank you received: 3
  • Hikashop Business
2 years 4 months ago #336663

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4.25

Hi, I have read through the forums and can't seem to understand how to remove 'component/hikashop' from the product URL. I have attached the screenshot of the SEF settings. I am using a 'Hikashop: Categories' on the page to display the products.

Thanks.

Attachments:

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
2 years 4 months ago #336669

Hi,

From what I can see on your website, you're using one or several HikaShop product listing modules to display the products listings.
In the settings of each of these modules, in the joomla modules manager, you have a setting "menu" where you need to select a menu item of the type "HikaShop products listing" so that Joomla's SEF system will use the alias of that menu item instead of component/hikashop when generating the SEF URL.
So make sure that this is the case. You might need to first create that menu item via the Joomla menu manager.

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

  • Posts: 39
  • Thank you received: 0
  • Hikashop Multisite
2 years 2 months ago #338597

Hi,

It's possible change name "component/hikashop" in the url (ex. shop). I'n try not use product listing menu item.
thanks

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
2 years 2 months ago #338602

It's not HikaShop but Joomla doing this.
As I said in my previous message here, Joomla will replace "component/hikashop" by the alias of the menu item used to generate the SEF URL.
So if you have a URL with "component/hikashop" you need to edit the settings of the element which generated that URL as there is normally a menu / itemid setting where you can select the menu item to use so that component/hikashop will be replaced by its alias.
Not knowing where you have that URL, I can't say exactly where you need to go.
I would need a link to the page where you found that URL.

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

  • Posts: 10
  • Thank you received: 0
6 months 2 weeks ago #354973

Hello, I have a similar problem.

I would like to get rid of all the component/hikashop/product/ URLs on my site.

One of my old product URLs showed up in Google Search Console and I am unable to fix it.

The URL is
mysite.com/component/hikashop/product/2-old_product_name

Obviously 2-current_product_name would be better.

But what's worse is that any random text string seems to work after the 2-, such as

component/hikashop/product/2-asoldaskljdsfjldfkqjsdsdf

Basically I would like to hide any URL that is /component/hikashop/product/ as I don't think they are required.

Is there any way to do this with hikashop or do I have to use the .htaccess file ?
Thanks

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 months 2 weeks ago #354975

Hi,

This means that something on your website generated that URL at some point without providing the menu item to Joomla (as I was explaining in my previous message here).

What to do exactly is hard to say as I don't know the situation on your website.

First, you're saying that you see that URL on your "Google Search Console". Google Search Console should also tell you where it found this link (the referer). Do you see it ? Could you provide the URL of that referer with the real website URL ?
That way, we can check where that URL is being generated and tell you what is not configured properly on your website. For example, in modules displaying listings of products, you have a "menu" setting where you can select a menu item. If you do so, the URLs of the products displayed on that module will use the alias of this menu item instead of "component/hikashop".
Also, could you provide a screenshot of the settings under the SEF section of the Features tab of the HikaShop configuration page ?

Also, the fact that a page can be accessed by many URLs is not a problem. That's the case for almost any URL out there.
For example, I can access the page www.youtube.com/ with the URL www.youtube.com/?test=1 or with the URL www.youtube.com/?test=2 or anything I want after the ? and youtube will display the exact same page.
What's important is that the page provides in its headers a meta tag "canonical" to tell crawlers what is the URL the website wants this page to be indexed with. For this purpose, you have a "canonical URL" setting you can fill in your products with the main URL you want to be indexed.
Note that this URL needs to be a valid URL which allows the crawler to actually access the page.
If you got the URL mysite.com/component/hikashop/product/2-old_product_name indexed, it's probable that either the canonical URL of this product is empty, or that it is actually filled with that /component/hikashop/product/2-old_product_name URL. In any case, you'll want to properly fill this setting.

So basically, you should not need to use the htaccess for all this. You got to this result because something somewhere was not configured properly. Fixing the settings will fix the problem.

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

  • Posts: 10
  • Thank you received: 0
6 months 2 weeks ago #354982

Hi, thanks for the quick reply.

I've provided a screenshot of what I see in Google Search Console as well as what I see in the SEF options for HikaShop.

It seems the referrer was from an E-learning component on my website. The URL was the "add to cart HTML link" url provided in the hikashop product options.

I've since created a separate menu item for the product. The canonical url is a sales page for the article.

Are you saying that because I have provided a canonical URL I shouldn't worry that this page is indexed by Google?

I am aware that any string you put after ? in a URL won't always affect the page display. But as you can see in my original post, the URL doesn't have a ?

Looking forward to your clarifications and thank you for your help.

Attachments:

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 months 2 weeks ago #354995

Hi,

Are you saying that because I have provided a canonical URL I shouldn't worry that this page is indexed by Google?

Based on your latest screenshot, I can see you do have a problem.
The page /component/hikashop/product/2-create-a-fingerstyle-guitar-arrangement
says that its canonical URL is /cheatsheet
However, the page /cheatsheet is not the same page.
That's why Google is referencing /component/hikashop/product/2-create-a-fingerstyle-guitar-arrangement
From this, I understand that you entered "cheatsheet" in the "canonical URL" setting of your product "create-a-fingerstyle-guitar-arrangement". This is wrong.
You should enter there one of the URLs of the product which is valid. For example, if you create a menu item with the alias "create-a-fingerstyle-guitar-arrangement" of the type "product page" linked to this product, so that when you click on that menu item, you get the product page, then you should enter /create-a-fingerstyle-guitar-arrangement in the canonical URL setting of this product.

Another thing is that Google says that it found the URL /component/hikashop/product/2-create-a-fingerstyle-guitar-arrangement on the page /courses?course_type=0
However, I don't see that URL anywhere there.
So I suppose it means you've change things around since Google indexed /courses?course_type=0 and you want it to reindex that page.

I am aware that any string you put after ? in a URL won't always affect the page display. But as you can see in my original post, the URL doesn't have a ?

It's not a matter of having a ? or not. My point is that it's normal that a page can be accessed from several URLs. Your problem is not there.
I was answering to this:

But what's worse is that any random text string seems to work after the 2-, such as

component/hikashop/product/2-asoldaskljdsfjldfkqjsdsdf

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

  • Posts: 10
  • Thank you received: 0
6 months 2 weeks ago #355026

OK Thanks for the reply.

I was using the canonical URL feature of Hikashop to replace the product page with my own sales page. But clearly this was incorrect because as you pointed out, canonical refers to the same page.

I have created product menu items for each of the products on my website and entered the correct canonical URL.

But it's still possible to access the URL that contains component/hikashop/product/2-

I still would like to get rid of component/hikashop/product/2-xxx

Please advise on what I should do to handle this. Thanks for your help.

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 months 2 weeks ago #355027

Hi,

You don't need to do anything. It's normal that you can access the page component/hikashop/product/2-

For example, you can access the page www.hikashop.com/extensions/hika-essential.html with the URL www.hikashop.com/component/hikashop/product/cid-1.html
However, since the canonical URL is "/extensions/hika-essential.html" in the "HikaShop Essential product on our website, search engines will only reference www.hikashop.com/extensions/hika-essential.html and thus your users will use this URL and the other URL won't be used at all.

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

Time to create page: 0.104 seconds
Powered by Kunena Forum