Are you looking to remove product category slugs from your WooCommerce product category pages?
Removing product category permalinks are good for producing shorter URLs.
While WooCommerce allows you to change the product category slug name, it does not allow you to remove it completely.
That’s where this guide comes in.
So, today I’ll show you an easy way to remove the product category slug completely.
WooCommerce Won’t Allow You to Remove Product Category Slugs
By default, WooCommerce assigns product category pages to all have “/product-category/” as a prefix in their URL structure.
For example, if you have a product category called “sweaters”, the URL when viewing this category will default to:
https://example.com/product-category/sweaters
Within Settings->Permalinks, then the “Optional” section, WooCommerce allows you to change “/product-category/” to whatever you want.
However, WooCommerce will not allow you to set this field as nothing.
Instead, it forces you to have at least one character for the product category slug.
So, you could set the product category to a single character to shorten the URL; for example:
https://example.com/c/sweaters
Indeed, this reduces the length of the URL, but if the goal is to have shorter URLs, then it would be even better to not have any base slug/prefix at all.
How to Remove Product Category Slugs with Permalinks Manager Pro Plugin
I recommend the plugin Permalinks Manager Pro, which is what I use for all of my WooCommerce stores.
With it, you can easily remove product-category base slugs from your product category page URLs.
Additionally, you can modify the URL structures of virtually any other URL on your site, such as removing the product base from product page URLs.
Step 1: Install Permalinks Manager Pro
The first step is to download, install, and activate Permalinks Manager Pro.
Step 2: Change Product Category Permastructure
In admin side panel, go to Tools->Permalinks Manager, then click on the “Permastructure” tab.
Scroll down to “WooCommerce” section.
For “Products categories” field, simply remove “product-category/” from the field, but make sure to keep %product_cat%.
Next, press “Save Permastructures” button at the bottom of this page.
What this does is sets all new product categories that you create to not include “/product-category”/ in their URL structure.
Instead, the new format will be:
https://mystore.com/product-category-name
However, you still need to remove “/product-category/” from your existing product category page URLs.
Step 3: Remove product category slug from pre-existing products category URLs
With Permalinks Manager, there are two ways you can remove the “/product-category”/ base slug from your pre-existing product category pages.
The first method is where you’ll manually edit the product category page URLs, one-by-one.
The second option is to do a bulk edit, replacing all URLs in one go.
If you don’t have many URLs, you can choose the manual option; otherwise, go with
Manual edit
In admin side panel, go to Tools->Permalinks Manager, then click on the “URL” editor tab followed by “Product categories” link.
Here you can view all of your product category page URLs.
All you have to do is remove “product-category/” from each URL.
Once that is done, simply press the “Save all the URLs above” button to change your product category URLs.
Bulk edit
Here you can bulk edit all of your URLs to the new structure at once, by regenerating all product category URLs.
In admin side panel, go to Tools->Permalinks Manager, then click on the “Tools” tab followed by “Regenerate/Reset” link.
With this tool, there are several options.
Here’s what to do:
- Make sure mode is kept at “Regenerate custom permalinks”
- For “Select content type” choose “Taxonomies”
- For “Select taxonomies” only choose “Product categories”
If everything is set up correctly, press “Regenerate”.
Once all the links are regenerated, Permalinks Manager will show you the modified URLs.
The result is that all of your pre-existing product category page URLs will have the “/product-category”/ base slug removed.
Why Remove Product Category Slugs?
Most often, the reason you’ll want to remove product category slugs is for the following two reasons:
Shorter URLs as a Ranking Signal
Many SEOs will state that shorter URLs are better for SEO.
That Google prefers shorter URLs.
As such, many SEOs shorten the URLs of their webpages.
Although technically, at least as it relates to a direct ranking signal, Google has stated they prefer “Simple URLs” not necessarily shorter.
Simple URLs consist of real words, are descriptive, and are relevant to the page’s content.
If you’re interested, you can read more about this in my post on are shorter URLs better for SEO?
With that said, there are still a few other reasons why you would want to shorten your URLs:
Shorter URLs Look Nicer
Shorter URLs look nicer than longer ones.
For example, I’d say the product category page URL:
https://website.com/red-widgets
Looks better than:
https://website.com/product-category/red-widgets
Shorter URLs are also easier for real humans to remember.
Additionally, they can lead to more clicks in the search results, appearing more trustworthy, compared to longer, messier URLs.
Conclusion
Removing /product-category/ base slugs from your product category pages in WooCommerce will produce shorter, more direct URLs.
WooCommerce will not allow you to remove product-category slugs by itself.
Although with Permalinks Manager Pro, it can be done quickly in only a few simple steps.