1. Documentation
  2. Plugins
  3. WooCommerce
  4. Extensions

Custom Permalinks for WooCommerce

 

Setup and Configuration ↑ Back to top

To set up your store with Custom Permalinks for WooCommerce:

Go to WooCommerce > Settings > Custom Permalinks. ↑ Back to top

Here you can find everything you need to set up permalinks for your products and categories pages. 

Set up product permalinks. ↑ Back to top

You can find 4 options here: 

Use defaults – extension doesn’t affect your product’s permalinks in any way. Your permalinks would be the same as you set in the general WordPress settings. 

Product slug alone – you will see product slug right after the domain name. /product/, /product-category/, and any other part of the default permalink structure will be cut off. 

Product slug with category name – you can create pretty URLs that will indicate the main category where the product is situated (it also may be category chosen in Yoast SEO plugin if you use that option) + product slug alone. 

Full path – differs from the last option only with one additional part of permalink – parent category. In case you use second-level categories, the URL will be formed with 1st level category slug + 2nd level category slug + product slug. 

Changing permalink structure for the product separately from general settings

Aside from setting up permalinks for all product pages, you can also set up a permalink structure for each product separately. 

Enable ‘Product specific permalinks’ feature in Advanced settings:

Then go to the product page, for which you wish to change the permalink and you will find a new metabox available for you – Custom permalinks.

Here you can change permalink settings that will be applied for this specific product only. It doesn’t affect any other products in the store. 

For instance, if you want to keep the regular WooCommerce permalink structure for all products except a few and make landing pages for those few, you can choose Use WooCommerce defaults on general plugin settings level, and then go to those product pages and pick up the desired structure for them separately, e.g. Product slug alone. In this case, all of your products will have a regular WooCommerce structure (store.com/product/product-slug) except those few landing pages with store.com/product-slug URL structure.

Set up category permalinks. ↑ Back to top

After customizing permalinks for product pages, you may want to change categories permalinks as well. You have 3 options here:

Use defaults – extension doesn’t affect your category’s permalinks in any way. Your permalinks would be the same as you set in the general WordPress settings. 

Category slug alone – extension simply removes /product-category/ part from the URL and leaves the only category slug right after the domain. 

Full path – in case you use second-level categories, the permalink will consist of 1st level category slug (parent category) + 2nd level category slug. 

Replace product slug w/ SKU ↑ Back to top

There are times when you want to replace the regular product slug (which is usually generated from the product title) with another product identifier – SKU. Be aware, to use SKU as the product slug you need to determine SKU for every product here: 

Add extensions after the slug (.html, .htm, .php) ↑ Back to top

In case you migrated from another CMS and wanna replicate old URLs, you may need to extend a regular slug with some custom URL ending, like .html. You can specify any kind of ending you want in that field and then apply it to every product or category page.  

Advanced settings  ↑ Back to top

In this section, you’ll find options that might be beneficial or even crucial for your SEO, so don’t forget about it. 

  • Turn on 301 redirects. 

301 redirects affect both regular users and search engine crawlers. When you’re editing permalinks on existing products and categories, it’s better to use 301 redirects. After enabling 301 redirects, anyone who goes to the old URL will be redirected to the corresponding new URL so that you won’t lose any old clients. 

  • Add canonicals to avoid content duplicates 

After you make changes in permalinks, the page would be reachable by two different URLs (the old one and the new one). rel=”canonical” link tag specifies the “preferred” version of a web page, so search engines don’t consider them to be content duplicates. 

  • Choose the primary category (via Yoast plugin)

This feature is available only if you utilizing Yoast SEO plugin. If so, you can enable categories from Yoast settings to be considered for permalinks. Yoast plugin instructions on primary category.  

Sitemap  ↑ Back to top

To let search engines know about your newly established URLs better to place them into sitemap.xml. To do so, please install the Yoast SEO plugin and turn off any other plugins that you may use for sitemap generation. Then every new URL will be placed to sitemap.xml automatically. 

FAQs ↑ Back to top

  • Can this extension hurt ranking on Google?

The answer could be yes and no at the same time. If you’re using the extension on a newly created website, it would probably only improve your SEO. But if you’re going to change permalinks for pages that already have some search volume, then better go read about 301 redirects or consult with SEO experts on how to do it in the safest way. 

  • Do I need to regenerate URLs in some way after changing the permalinks structure?  

No, you don’t. All the URLs will be changed automatically after you click the “save changes” button.

  • What will happen with permalinks if I remove the extension? 

In that case, you’ll find that all of your URLs are restored and look the same they were before installing the plugin. 301 redirects and canonical rules will be deleted as well.

How to remove product base from URL in WooCommerce?

1. Download Custom Permalinks for WooCommerce from the WooCommerce marketplace.
2. Go to WooCommerce > Settings > Custom Permalinks.
3. In the “product permalinks” section choose “Product slug alone” or “Product slug with category name” if you want to include category slug into URL.Remove /product/ base from URL in WooCommerce

How to remove product-category base from WooCommerce URL?

1. Download Custom Permalinks for WooCommerce from the WooCommerce marketplace.
2. Go to WooCommerce > Settings > Custom Permalinks.
3. In the “category permalinks” section choose “Category slug alone” or “Full path” if you want to include category entire path to this category in the URL. How to remove product-category base from WooCommerce URL?

How to add ending to URLs in WooCommerce (.html, .htm, .php)?

1. Download Custom Permalinks for WooCommerce from the WooCommerce marketplace.
2. Go to WooCommerce > Settings > Custom Permalinks.
3. Type .html, .htm, .php, or any other extension you wish to see in the URLs ending. Then choose what kind of URLs you wanna change – product pages, category pages, or both. How to add ending to URLs in WooCommerce (.html, .htm, .php)?

WooCommerce - the most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment