Removing /product/ from Woocommerce Product Permalinks / Slugs

99% of WooCommerce users would prefer to use beautiful permalinks/slugs for WooCommerce product pages. But also for category pages!

Its possible to have beautiful permalinks/slugs in WooCommerce. The Perfect SEO Url plugin removes the category slug immediately after installation. Easy installation and it works out of the box. Lets find out what this plugin does.


Perfect SEO Url

Perfect SEO Url

And many of us want prettier permalinks!




To achieve this, we need a nice plugin: Perfect SEO Url for WooCommerce and some small SEO tricks to make it even better.

The installation of the plugin is similar to installing all other WordPress/WooCommerce plugins. After installation the plugin works automatically, you can change some settings if you want.

Perfect SEO Url 2

Some Setup & SEO tricks

The first 2 checkboxes should be activated at all time! Otherwise you will lose ranking.

Its important to check ‘redirect product’ box, because you want that the old product automatic redirects to the new one. This makes sure that Google knows that something has changed. The plugin creates ‘permanent 301 redirects’. This is perfect to let Google know that the page has moved permanently.

Also check the ‘redirect product category’ box. For the same reason.

If you use producttags in WooCommerce, then check ‘redirect product tag + tag support’.

You can also activate the category results box, for showing only products in the category. This is very nice if you want to have a page full with only products instead of categories.

Category product relation can be used when you see a 404 page. (never happend to me…)

Click the Save Changes button, your WooCommerce product page + category page permalinks are now:





In all cases I tested the plugin, it worked like a charm. It is very fast and stable. The plugin is updated in February 2015 and was updated many times as shown in the changelog at the support page. Updates are always available.


In some webshops I noticed a growth in visitors within 3.5 weeks, this is very fast. Product categories and product pages have more visitors when using the plugin. It is also no problem to add new products or categories, because everything remains the same. You don’t even notice the plugin is active when using it.

Critical issues?

At this moment? None! But maybe the documentation in the website should be more comprehensive. The plugin is good and does what it says is supposed to do: remove the product and category slug.


It is also very big on the homepage of the Perfect SEO Url website :-) but I think this is the only properly working Woocommerce SEO Plugin. The benefits the plugin gives is worth every 119 dollar.



Free Way That Won’t Always Work

We need a nice pluginRemove slug from custom post type  and some tricks.

After installing this plugin, we go to its settings page:

Remove slug from custom post type settings

Click the Save Changes button, your Woocommerce product page permalinks are now :


If you want .html instead of /   , simply type in html and save changes.

woocommerce slug html

Now your product page slug should be :


Cheers !

In many cases, this plugin works like a charm, but sometimes it won’t work, especially in latest version of WordPress, as you can see, this plugin is not updated for 2 years….

The most typical problem is :

for old products, the slugs were changed successfully, but we can’t create new products, we would encounter 404 error when opening new product pages !

The solution is simple and quite funny:

Just set the publish time to some time long ago, today is 10th Jan. 2014, I set the publish time to 2013. Save it, your product were now “published long ago”, and you will be able to open the page, no 404 error anymore.

woocommerce 404 error

Another typical problem is that:

This plugin applies to all custom post type by default, we can’t exclude it from some other custom post types, like Portfolio (many themes have this sort of custom post type). So solve this, open the .htaccess file on root folder on your site.

RewriteRule ^product /(.+)/$ /$1 [R=301,L]
RewriteRule ^product_variation/(.+)/$ /$1 [R=301,L]
RewriteRule ^/(.+)/$ /$1 [R=301,L]
RewriteRule ^/(.+)/$ /$1 [R=301,L]
RewriteRule ^portfolio/(.+)/$ /$1 [R=301,L]

As you can see, there are many rules for other custom post types, like product_variation and portfolio. I would like to disable url rewritten for them. So I removed them, this code block becomes:

RewriteRule ^product /(.+)/$ /$1 [R=301,L]

Note: Don’t remove the 1st and last 2 lines which begins with #


  1. Clanshop   •  

    THanks Jeriff! your post helped us out… Thanks so much! This plugin is perfect!

  2. makeonlineshop   •  


    Can you explain me why I read on other blogs that it is not a good idea to delete “product” form Woocommerce shops url ?

    Can you think about any internal problem ?

    I need to import products after shop migration to woocommerce and I would like to keep the old previous URLs that do not have “product” word.

    Thank you.

    • Jeriff Cheng   •     Author

      it’s not good idea to change the default url structure.
      makes it more difficult for WordPress system to find out the right content for a certain url.
      whether http://www.domain.com/product-url/ is a post or product? WordPress needs more time and energy to think about it before displaying the right content.

  3. Alice   •  

    Thank you for the thorough post Jeriff. This plugin is awesome but quite pricey in my opinion.

    For those planning to get this, I would recommend using the coupon code: “ELFTRONIX” to get 7% OFF.


    • Webmaster   •  

      Wow..I can’t wait to save 7% — thanks


  4. Fallen   •  

    Hi Jeriff, this post was really helpful! I read it and showed it to my collegae’s. We downloaded to try the plugin and it works perfect, our shop runs with almost 4000 products… So yes! Thanks so much!

  5. dan   •  

    omg I’m a noob and have been searching for a solution to the 404 error for days. Asked 3-4 ‘developers’ and none could sort it. Changed the publish date as you said and its actually working lol. Thanks so much


  6. andy   •  

    Thank you very much Jeriff,

    I get stuck with woocommerce product permanlink every time. Your post really help me alot,

    Thank you!

  7. David   •  

    I understood and did. thank you very much but that’s the question.

    when I put in the permalink / product /% product_cat% it does not open the page vobosche. 404 is not an error. and writes a cyclic forwarding all. you know how to do so has become a reference site / category / product name?

  8. David   •  

    hello. I did not understand the first part of your post. how to remove links from the product?

  9. janfeng   •  

    Hi , Nice ! Ask a question:

    If the ‘product’ modified to ‘shop’, 301 should be how to write ?

Leave a Reply

Your email address will not be published. Required fields are marked *