[Skip to main content](#vessel-content)

#   canonical url

##

- **[dailybread](/forum/user/41988-dailybread "View dailybread's Profile")**
- [![dailybread's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/41988-dailybread "View dailybread's Profile") Topic Author
- [ Offline](/forum/user/41988-dailybread)

Less More

- Posts: 37
- Thank you received: 1
-
-

2 months 3 weeks ago [\#373040](#373040) by [dailybread](/forum/user/41988-dailybread "View dailybread's Profile")  *[canonical url](/forum/26-product-category-display/910755-canonical-url#373040 "-- HikaShop version -- : 6.5 -- Joomla version -- : 3.10  I moved some categories around and sub to others or split them out. Discovered in doing so the canonical url that was first set now is wrong and it goes to a error page for most products which it was set in those categories.  What apart from deleting each product canonical url link which would take a lot of time can I delete the link in the categories I moved on mass so they get recreated automatically when visited on the front end as normal.")* was created by *[dailybread](/forum/user/41988-dailybread "View dailybread's Profile")*

-- HikaShop version -- : 6.5
-- Joomla version -- : 3.10

I moved some categories around and sub to others or split them out.
Discovered in doing so the canonical url that was first set now is wrong and it goes to a error page for most products which it was set in those categories.

What apart from deleting each product canonical url link which would take a lot of time can I delete the link in the categories I moved on mass so they get recreated automatically when visited on the front end as normal.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3NTUtY2Fub25pY2FsLXVybD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

2 months 3 weeks ago [\#373042](#373042) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[canonical url](/forum/26-product-category-display/910755-canonical-url#373042 "-- HikaShop version -- : 6.5 -- Joomla version -- : 3.10  I moved some categories around and sub to others or split them out. Discovered in doing so the canonical url that was first set now is wrong and it goes to a error page for most products which it was set in those categories.  What apart from deleting each product canonical url link which would take a lot of time can I delete the link in the categories I moved on mass so they get recreated automatically when visited on the front end as normal.")*

Hi,

You can do that in one go with a mass action.

Go in the menu System &gt; Mass actions of HikaShop and create a new mass action with :

- Table : products
- Filter : add a filter on the "category" table and select the categories you moved, so that only the products of these categories are processed. If all the canonical URLs of your products were generated automatically anyway, you can simply add no filter at all and process all the products.
- Action : "Set canonical url", and leave its text field completely empty.

Then save and run the mass action. That action writes the value you enter in the canonical URL field of each product matching the filter, so with an empty value it just empties them all.

After that, since your setting "Force canonical URLs on listings" is set to "Use canonical URL and generate it if missing", HikaShop will store a new canonical URL on each product, based on your new category structure, the next time the page of the product is displayed on the front end.

One thing which is worth knowing, and which explains the error pages you see : that stored canonical URL is not only used for the canonical tag in the head of the page, it is also used to build the links to the products in the product listings. So as long as a product keeps an obsolete canonical URL, the link to that product in your listings points to the obsolete URL too. Emptying the field fixes both at once.

If the categories themselves also have an obsolete canonical URL, you can do the same with a second mass action on the table "categories", with the action "Update values", the column "category_canonical" and an empty value.

Finally, to avoid the situation happening again the next time you reorganize your categories, you can set "Force canonical URLs on listings" to "Use canonical URL if specified" in the configuration (tab Features, section "SEF URL options"). With that setting, HikaShop still adds a canonical tag on the pages, but it generates it from the current URL of the page instead of storing it in the database, so it always follows your current category structure. Only the canonical URLs you type yourself in the SEO area of a product are then used. Note also that with your current setting, the URL which gets stored is the first URL a visitor happened to use to reach the product, which is not necessarily the one you would have chosen.

The following user(s) said Thank You: [dailybread](/forum/user/41988-dailybread "View dailybread's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3NTUtY2Fub25pY2FsLXVybD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.069 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
