Permalink Change Redirect Builder

Build Apache or Nginx redirect rules for a WooCommerce product URL structure change, like dropping the category from the URL.

Configure with AI

Enter to submit · Shift + Enter for a new line

Why this needs its own redirects

WooCommerce builds a product's URL from a permalink structure you set at WooCommerce → Settings → Products → General → Product data → Permalink settings, options like the shop base, or including the product category in the path. Changing that setting changes every product's URL at once. WordPress doesn't create redirects from the old structure to the new one automatically, so anyone with an old link (bookmarks, backlinks, search results) hits a 404 until you add one.

This tool builds a capture-group rule for the two most common changes (removing the category from the URL, or removing the shop base) or a custom pattern, for either Apache (.htaccess) or Nginx.

Making the change

  1. 01

    Change the permalink setting

    WooCommerce → Settings → Products → General, update Permalink settings, and save.

  2. 02

    Re-save permalinks

    Go to Settings → Permalinks and click Save Changes, even without changing anything, to flush WordPress's rewrite rules.

  3. 03

    Add the redirect rule

    Paste the generated rule into your .htaccess (Apache) above the WordPress block, or into your Nginx server block.

  4. 04

    Test a real old URL

    Open a product page using its old URL and confirm it redirects to the new one.

Pitfalls

  • On Apache, paste the rule above the # BEGIN WordPress block, or WordPress's own rules may catch the request first.
  • Test the capture groups against a real product URL: a pattern that's slightly off will redirect to the wrong page instead of 404ing, which is harder to notice.
  • This only handles the URL structure. If you also changed category or product slugs individually, use the Nginx redirect generator or the regex tester for those one-off cases.

Questions people ask

Where do I change the product permalink setting?

WooCommerce → Settings → Products → General, under Permalink settings at the bottom of the page.

Do I need to redirect category and tag pages too?

Only if their URLs also changed. Product category and tag archive URLs use WordPress's normal permalink settings, separate from the product base.

Will this affect my SEO rankings?

A correctly set up 301 redirect preserves most of a page's search ranking value. Missing redirects (plain 404s) are what actually costs rankings and traffic.

Nginx or Apache, which do I use?

Check with your host if you're not sure. Most managed WordPress hosts use Nginx or a mix of both; shared hosting more often uses Apache with .htaccess.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com