Looking for how to remove product base slug from product page URLs in WooCommerce?
Removing product permalinks are good for producing shorter URLs.
WooCommerce allows you to change the name of the product base slug to another term.
However, it does not allow you to remove it completely.
That’s where this guide comes in.
In this simple to follow tutorial, I’ll show you an easy way to completely remove the product slug from your product page URLs.
Why Remove Product Base Slugs?
Commonly, the reason why you’d want to remove product base slugs is usually due to the following:
Shorter URLs as a Ranking Signal
You will often hear SEOs claim that when it comes to SEO, shorter URLs are better for ranking in Google.
In turn, 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 generally look nicer when compared to longer ones.
For example, I’d say the product URL:
https://example.com/red-apples
Looks better than:
https://example.com/product/12-pc-medium-sized-sutherland-red-apples
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.
WooCommerce Won’t Allow You to Remove Product Slugs
By default, WooCommerce assigns product pages to all have “/product/” as a base slug/prefix in their URL structure.
For example, if you have a product page called “red apples”, the URL of this product page will default to:
https://example.com/product/red-apples
Within Settings->Permalinks, then the “Product Permalinks” section under “Custom base”, WooCommerce allows you to change “/product/” to whatever you want.
Although WooCommerce will not allow you to set this field as nothing.
Instead, it requires you to enter at least one character for the product slug.
So, you could change the product slug to a single character to shorten your product page URLs; for example:
https://example.com/p/red-widgets
This will indeed reduce the length of the URL, but if your goal is to have shorter URLs, then it would be better to not have any link prefix here at all.
How to Remove Product Slugs with Permalinks Manager Pro
Since WooCommerce by itself won’t allow you to completely remove the product base slug, you’ll have to use something else to achieve this.
What I recommend is the plugin Permalinks Manager Pro.
I use it for all of my WooCommerce stores when it comes to modifying URL structures.
With this plugin, you can also remove the product category base slug from your product category pages.
Step 1: Install Permalinks Manager
Download, install and activate Permalinks Manager Pro.
Step 2: Remove Product Slug from Permalinks
In admin side panel, go to Tools->Permalinks Manager, then click on the “Permastructure” tab.
Scroll down to “WooCommerce” section.
For “Products”, simply remove the word “product/” (the product base slug) but keep “%product%”.
Next, press “Save Permastructures” button at the bottom of this page.
What this does is removes the “/product/” from all new products that you will create.
However, we still need to remove the product slug from pre-existing products.
Step 3: Remove product slug from pre-existing products
There are two ways you can do this with Permalinks Manager.
The first option involves changing each link manually, one-by-one.
The second option allows you to bulk change all of your product URLs in one go.
If you have a lot of existing products, you’ll want to go for the bulk option; so, you can skip this section on manually change each product URL.
Manually change each product URL
Within the Permalinks Manager settings, go to the “URL editor” tab then “Products” link.
Here you can remove the product base slug manually from each of your product page URLs.
For example, currently my “spinach” product’s URL has the “/product/” base slug, since it was a pre-existing product.
All I have to do is remove “product/” from this field.
After saving, the product base slug will be gone for this URL.
If you have only a few pre-existing products, then this option of individually changing every link can work fine.
Bulk change product URLs
Within Permalinks Manager settings, go to the “Tools” tab then “Regenerate/Reset” link.
Here you have some options for regenerating URLs.
Here you will be able to bulk change all your product page URLs at once, based on the permastructure that you changed in Step 2.
In other words, this setting will bulk remove all of the “/product/” base slugs from your pre-existing product page URLs.
Here is what to do:
- Make sure Mode is kept at “Regenerate custom permalinks”.
- For “Select post types” you only want “Products” selected
- For “Select post statuses” select all post status types
If everything is set up correctly, press “Regenerate”.
Once all the links are regenerated, Permalinks Manager will show you the modified URLs.
As you can see, for my products, their URLs have changed, and successfully bulk removed the “/product/” base slugs.
(Optional) Adding Product Category to Product URLs
There is another option that’s worth mentioning now that you’ve removed “/product/” base slug from your URLs.
Should you wish to, you can set a new product base.
In this case, it will a base slug that dynamically shows the product’s category within the URL of any particular product page.
So, the URL structure will look like this:
https://example.com/product-category-name/product-name
For example, if the product was “red-apples” and it belonged to the product category “fruits”, the product page URL would be:
https://example.com/fruits/red-apples
The benefit of this structure is that it gives customers a better idea of where they are on your store from the URL alone.
Additionally, it shows customers more about your product range by displaying the product’s category in the URL itself.
Keep in mind, it’s just something to consider.
Whether you believe it to be a better option for your store or not will be up to you.
If you’re interested, you can see my guide on how to add product category to product page URLs.
Conclusion
Removing the “/product/” base from WooCommerce will produce shorter, more direct URLs for your product pages.
WooCommerce does not allow you to remove the product base slug, only to rename it.
However, with Permalinks Manager plugin, we can easily get around that and remove it entirely.