Skip to main content
WooCommerce guide

301 Redirect for WooCommerce Stores

By ยท Updated ยท 7 min read

How WooCommerce Handles 301 Redirects

WooCommerce runs on WordPress, which means redirect management sits outside the core WooCommerce plugin itself. WooCommerce does not ship with a native redirect manager. When you delete a product, change a slug, or restructure your category taxonomy, WordPress and WooCommerce do not automatically issue a 301 redirect from the old URL to the new one โ€” the old URL simply returns a 404. That gap is what every WooCommerce store operator must fill deliberately.

The platform does provide one partial exception: when you change a product or page slug inside the WordPress editor and save, WordPress core records the old slug in the wp_postmeta table and creates an internal redirect through the rewrite system. This is not a true server-level 301; it works through WordPress query processing and is slower than a header-level redirect. For SEO authority transfer and crawl efficiency, it is not an adequate substitute for a proper 301.

Built-In WordPress Slug Redirects vs. True Server-Level 301s

When WordPress detects a request for a former slug stored in its database, it processes the rewrite before serving content and returns a 301 header to the browser. This means the redirect works correctly from a status-code perspective, but it still executes PHP and hits the database before firing. On high-traffic WooCommerce stores with large catalogs, dozens of these application-layer redirects compound into measurable server load โ€” especially during crawl bursts from Googlebot.

A server-level 301 in the Apache .htaccess file or an Nginx configuration block fires before PHP ever loads. For WooCommerce stores on shared hosting or lower-tier managed WordPress hosts that do not expose Nginx config directly, .htaccess is the accessible path. For stores on hosts like Kinsta, WP Engine, or Cloudways running Nginx, rules must go into a custom Nginx configuration snippet provided through the host's dashboard, because Nginx ignores .htaccess files entirely.

The practical rule: use a redirect plugin to manage redirects at the application layer for most URL changes, and reserve .htaccess or Nginx rules for high-volume redirects (discontinued product lines, full category restructures) where server-level performance matters.

WooCommerce-Specific URL Patterns That Require Redirects

WooCommerce generates several URL structures that create redirect needs unique to ecommerce. Product URLs default to /product/slug/ unless the product base is changed in Settings > Permalinks. Category URLs default to /product-category/slug/. Variation URLs do not have standalone pages โ€” only the parent product URL exists โ€” so redirecting discontinued variations requires pointing to the parent or a replacement product, not a variation-specific path.

Shop page restructuring is another common trigger. WooCommerce assigns a single page as the shop root (set in WooCommerce > Settings > Products > Shop page). If that page is ever deleted or reassigned, the /shop/ URL breaks. Filtered URLs generated by layered navigation plugins like FiboFilters or WooCommerce's own attribute filtering (e.g., /product-category/shirts/?filter_color=red) are dynamic and should not receive 301 redirects individually โ€” canonical tags handle those.

Checkout and cart URLs (/cart/, /checkout/, /my-account/) are assigned WooCommerce page IDs. Changing their slugs requires updating the corresponding page in WooCommerce > Settings > Advanced in addition to setting a redirect, otherwise WooCommerce stops recognizing those endpoints entirely.

Redirect Plugins in the WooCommerce Ecosystem

Redirection by John Godley is the most widely used WordPress redirect plugin and works cleanly on WooCommerce stores. It logs 404s, allows regex-based redirect rules, and stores all redirects in its own database table (wp_redirection_items) rather than options or postmeta, keeping the implementation organized. It supports HTTP 301, 302, and 307 codes, and allows conditional redirects based on login state โ€” useful for redirecting /my-account/old-endpoint/ to a new one only for logged-in users.

Yoast SEO Premium includes a redirect manager that integrates directly with the WordPress slug-change workflow: when you update a product slug, Yoast prompts you to create a redirect from the old URL immediately. This is operationally efficient for WooCommerce stores where product slug changes happen frequently through the product editor. The free version of Yoast does not include this feature.

Rank Math, another SEO plugin with strong WooCommerce adoption, includes a redirect module in its free tier. It supports 301, 302, 307, 410, and 451 redirects and auto-creates redirects on slug change, similar to Yoast Premium. Both Rank Math and Yoast store redirects in WordPress options tables, which can slow option loading on stores with hundreds of active redirects โ€” a scaling consideration for large catalogs.

Managing Redirects During WooCommerce Migrations and Catalog Restructures

Migrating a WooCommerce store to a new domain, changing the permalink structure, or merging two product catalogs generates redirect volume that plugin UI management cannot handle efficiently. The correct approach is to build a CSV of old-to-new URL pairs and import it. Redirection supports CSV import natively. For Rank Math, redirect import requires JSON format. Both tools allow bulk operations that would take hours to complete manually.

Changing the WooCommerce permalink base โ€” for example, from /product/ to /shop/products/ โ€” invalidates every product URL in the catalog simultaneously. Before making this change in Settings > Permalinks, export all existing product URLs, pre-build the redirect map, and import it before or immediately after switching. Googlebot will begin encountering old URLs within hours of a crawl cycle; delays in redirect implementation translate directly into ranking loss for established product pages.

Actionable Setup for WooCommerce 301 Redirect Management

First, install Redirection or enable Rank Math's redirect module and activate 404 logging immediately โ€” this creates a baseline of broken URLs already being hit. Second, audit your WooCommerce permalink settings and document the current URL structure for products, categories, and tags before making any changes. Third, for any product deletion, set the redirect before or at the moment of deletion, not after; WooCommerce removes the post record on deletion, and post-deletion the slug is no longer stored, making the mapping harder to reconstruct.

Fourth, for Nginx-hosted stores (Kinsta, WP Engine, Cloudways), confirm whether your host applies application-layer redirects via plugin or requires server-side rules for performance-critical redirects โ€” most managed hosts apply plugin-based redirects through WordPress, not at the server level, even on Nginx. Fifth, schedule a quarterly redirect audit: export the redirect table, identify chains (A โ†’ B โ†’ C), and collapse them to direct 301s (A โ†’ C). Redirect chains add latency and dilute the speed of link equity transfer, both of which matter for WooCommerce stores competing on product-level organic rankings.

Frequently asked questions

Does WooCommerce automatically create 301 redirects when I delete a product?

No. When you delete a WooCommerce product, the URL returns a 404 immediately. WooCommerce and WordPress do not auto-generate a redirect on deletion. You must set the redirect manually using a plugin like Redirection or Rank Math before or at the moment of deletion. If the product is trashed rather than permanently deleted, the slug remains in the database and WordPress's internal redirect still fires.

What is the difference between a WordPress slug redirect and a server-level 301 in WooCommerce?

A WordPress slug redirect executes through PHP and a database query before returning the 301 header. A server-level 301 fires in Apache .htaccess or Nginx config before PHP loads. Both return a 301 status to browsers and crawlers, but server-level redirects are faster and impose less server load. For most WooCommerce stores, plugin-based redirects are sufficient; server-level rules are worth implementing only for high-volume redirect sets.

Which redirect plugin works best for WooCommerce stores with large product catalogs?

Redirection by John Godley is the most scalable option for large catalogs because it stores redirects in a dedicated database table rather than the WordPress options table, avoiding option-loading overhead. Rank Math's redirect module is a strong choice for stores already using Rank Math for SEO, as it includes 404 monitoring and slug-change auto-redirect in the free tier. Yoast SEO Premium offers similar auto-redirect functionality with a polished workflow.

How do I handle 301 redirects when changing the WooCommerce product permalink base?

Before changing the product permalink base in Settings > Permalinks, export all current product URLs and build a complete old-to-new URL mapping. Import this as a bulk redirect CSV into your redirect plugin before applying the permalink change. If you apply the change first, all product URLs return 404 immediately. The redirect plugin should process these rules before Googlebot re-crawls, typically within 24โ€“48 hours of a permalink structure change on an established store.

Should WooCommerce layered navigation filter URLs get 301 redirects?

No. Filtered URLs like /product-category/shoes/?filter_color=black are dynamic and can generate thousands of URL combinations. Applying 301 redirects to each is not practical or necessary. The correct approach is canonical tags pointing filtered URLs to the base category URL. Most SEO plugins, including Yoast and Rank Math, handle this automatically when configured correctly with WooCommerce layered navigation.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →