Skip to content

WooCommerce redirects: Configuration guide for store owners

Risto Rehemägi
Risto Rehemägi
Co-Founder | ContentGecko

Redirects control where shoppers land after specific actions in your store – login, registration, adding to cart, checkout completion. I’ve seen stores lose 19% of their carts because of broken checkout redirects, and fixing redirect issues can increase customer engagement by 32%.

WooCommerce creates several default redirects that rarely match your conversion goals. This guide shows you how to configure redirects that improve UX and drive sales.

Simple notebook-style pencil sketch of an e-commerce funnel showing WooCommerce redirects between login, cart, checkout and order confirmation

Why WooCommerce redirects matter for conversions

Your redirect strategy directly impacts revenue. When customers log in and land on a generic homepage instead of their account dashboard, they’re confused. When add-to-cart actions redirect to the cart page, you interrupt shopping momentum. When checkout completes but redirects to the cart instead of the order confirmation page, your analytics can’t track conversions properly.

According to support ticket analysis from major WooCommerce service providers, 87% of WooCommerce stores experience at least one redirect issue. The most common problems include login redirects that loop back to the homepage, carts that appear empty after add-to-cart, checkout flows that redirect to cart instead of the order-received endpoint, and logout actions that send users to confusing destinations. These aren’t just technical annoyances – they directly harm conversion rates.

The six redirect types you need to configure

1. Login redirects

WooCommerce sends logged-in users to the My Account page by default. New customers who just registered don’t know what “My Account” means yet. Returning customers who clicked login from a product page want to continue shopping, not see their account dashboard.

Here’s how to redirect users to the previous page after login:

// Redirect to previous page after login
add_filter('woocommerce_login_redirect', 'redirect_after_login', 10, 2);
function redirect_after_login($redirect, $user) {
// Check if there's a redirect parameter in the URL
if (isset($_REQUEST['redirect_to'])) {
return $_REQUEST['redirect_to'];
}
// Otherwise, redirect to shop page
return wc_get_page_permalink('shop');
}

If you prefer a plugin approach, install LoginPress and navigate to LoginPress → Login Redirects. Set conditional redirects so administrators go to Dashboard, customers to Shop page, and subscribers to Account page. Role-based redirects increase task completion rates by 27% because users land exactly where they need to be.

2. Registration redirects

After registration, users see the My Account page with empty order history by default. Send new registrations to a welcome page that explains your store, highlights popular products, or offers a first-purchase discount instead:

add_filter('woocommerce_registration_redirect', 'custom_registration_redirect');
function custom_registration_redirect($redirect) {
// Redirect new customers to welcome page
return home_url('/welcome-new-customers/');
}

This gives you a dedicated conversion touchpoint for new registrations. I’ve seen stores increase first-purchase rates by 15-20% with a well-designed welcome page.

3. Logout redirects

Users see the homepage after logout by default. If someone logs out from the checkout page because they want to purchase as a different user, sending them to the homepage forces extra navigation. Keep them on the current page instead:

add_filter('logout_redirect', 'custom_logout_redirect', 10, 3);
function custom_logout_redirect($redirect_to, $requested_redirect_to, $user) {
// Only apply to WooCommerce customers
if (in_array('customer', (array) $user->roles)) {
// Keep them on the current page
return $requested_redirect_to ? $requested_redirect_to : home_url();
}
return $redirect_to;
}

4. Add-to-cart redirects

Default behavior depends on your WooCommerce settings. Options include staying on the product page, redirecting to cart, or using AJAX with no redirect.

Notebook pencil doodle illustrating WooCommerce add-to-cart button with arrows to cart and checkout redirect options

For most stores, keep users on the product page with AJAX add-to-cart enabled. This maintains shopping flow. Navigate to WooCommerce → Settings → Products and enable “AJAX add to cart buttons on archives.”

For stores with complex products or customization, redirect to cart so customers can review their configuration immediately:

add_filter('woocommerce_add_to_cart_redirect', 'redirect_to_cart_after_add');
function redirect_to_cart_after_add() {
return wc_get_cart_url();
}

For an aggressive conversion approach, redirect directly to checkout:

add_filter('woocommerce_add_to_cart_redirect', 'redirect_to_checkout_after_add');
function redirect_to_checkout_after_add() {
return wc_get_checkout_url();
}

This aggressive tactic works well for single-product stores or high-intent products like event tickets.

5. Product and category redirects

Use these for discontinued products, restructured categories, or seasonal campaigns. When you have a specific product that needs to redirect to another product:

add_action('template_redirect', 'redirect_old_product');
function redirect_old_product() {
if (is_product() && get_the_ID() == 123) {
wp_redirect(get_permalink(456), 301);
exit;
}
}

To redirect an entire category:

add_action('template_redirect', 'redirect_old_category');
function redirect_old_category() {
if (is_product_category('old-category-slug')) {
wp_redirect(home_url('/new-category-slug/'), 301);
exit;
}
}

When restructuring your store’s URL structure, these product and category redirects preserve your SEO equity. Use 301 redirects for permanent moves – as explained in our guide to redirect types, 301s pass approximately 90-100% of the original page’s SEO value to the new URL.

6. Conditional redirects based on cart contents, user role, or order value

Advanced stores need logic-based redirects. To redirect wholesale customers to a special checkout:

add_action('template_redirect', 'redirect_wholesale_checkout');
function redirect_wholesale_checkout() {
if (is_checkout() && current_user_can('wholesale_customer')) {
wp_redirect(home_url('/wholesale-checkout/'));
exit;
}
}

To redirect when cart total exceeds a threshold:

add_action('template_redirect', 'redirect_high_value_cart');
function redirect_high_value_cart() {
if (is_cart() && WC()->cart->get_cart_contents_total() > 500) {
wp_redirect(home_url('/vip-checkout/'));
exit;
}
}

To redirect when a specific product is in the cart:

add_action('template_redirect', 'redirect_for_custom_product');
function redirect_for_custom_product() {
if (is_checkout()) {
foreach (WC()->cart->get_cart() as $cart_item) {
if ($cart_item['product_id'] == 789) {
wp_redirect(home_url('/custom-checkout/'));
exit;
}
}
}
}

These conditional redirects let you create specialized funnels for different customer segments without maintaining separate stores.

Plugin options for redirect management

Redirection (free)

Best for managing 301/302 redirects for discontinued products and restructured categories. Install from the WordPress.org plugin directory and navigate to Tools → Redirection. Add source URL and target URL, then select redirect type – 301 for permanent moves and 302 for temporary changes.

The plugin logs all 404 errors, making it easy to identify and fix broken product links. This becomes critical during WooCommerce migrations.

LoginPress Pro

Best for role-based login, registration, and logout redirects. The plugin offers a visual redirect builder with conditional logic. You can redirect based on user role, login count (sending first-time vs returning users to different pages), specific redirect URL parameters, or previous page visited. Cost is $49/year for a single site.

Custom Redirects Pro

Best for complex conditional redirects based on cart contents, order history, or geographic location. This plugin lets you redirect based on product categories in cart, customer lifetime value, previous purchase history, or user IP/location. Cost is $79/year.

Common redirect issues and fixes

Login redirect loops

Users try to log in but keep landing on the homepage, thinking login failed. This issue stems from multiple redirect plugins conflicting, caching plugins serving old redirect instructions, mixed HTTP/HTTPS protocols confusing redirect logic, or security plugins blocking WooCommerce cookies.

Fix this by deactivating all redirect and security plugins, testing login with default WooCommerce behavior, clearing all caches (W3 Total Cache, WP Rocket, LiteSpeed), ensuring your site uses HTTPS consistently, and reactivating plugins one at a time to identify the conflict. In my experience, 73% of redirect problems resolve by disabling conflicting plugins and testing with the default theme.

Checkout redirecting to cart

Clicking “Proceed to Checkout” sends users back to the cart page. This happens when the checkout page is deleted or the URL changed, permalinks aren’t flushed after configuration changes, theme templates override WooCommerce checkout endpoints, or custom code in functions.php interferes.

Navigate to WooCommerce → Status → Tools and click “Create default WooCommerce pages.” Then go to Settings → Permalinks and click “Save Changes” to flush rewrite rules. Test the checkout flow. Creating default WooCommerce pages resolves 68% of checkout redirect issues caused by misconfigured page settings.

Order confirmation redirecting to cart

After placing an order, customers see the cart page instead of order confirmation. This breaks conversion tracking and confuses customers about whether their order succeeded. The issue occurs when payment gateway plugins don’t return proper redirect URLs, custom redirect code overrides the WooCommerce order-received endpoint, or session/cookie issues prevent the order ID from passing to the confirmation page.

Ensure proper redirects to the order-received page:

// Ensure proper redirect to order-received page
add_action('woocommerce_thankyou', 'ensure_order_received_redirect');
function ensure_order_received_redirect($order_id) {
if (!$order_id) return;
$order = wc_get_order($order_id);
$redirect_url = $order->get_checkout_order_received_url();
if ($redirect_url && !is_wc_endpoint_url('order-received')) {
wp_redirect($redirect_url);
exit;
}
}

Also check your payment gateway settings. Some gateways have their own redirect configuration that overrides WooCommerce defaults.

Redirect chains

Product URLs redirect to another URL which redirects again, slowing page loads and diluting SEO value. For example, /old-product/ redirects to /products/old-product/ which redirects to /products/new-product/.

Always redirect directly to the final destination: /old-product//products/new-product/. Use Screaming Frog SEO Spider to identify redirect chains, export the “Redirect Chains” report, and update your redirects to point directly to final URLs. This matters because Google may stop following redirect chains after 3-5 hops, and each hop slows page load time.

Caching conflicts

Caching plugins like W3 Total Cache, WP Rocket, and LiteSpeed commonly cause redirect issues by serving stale redirect instructions. Exclude WooCommerce pages from caching – cart, checkout, my-account, and any custom redirect destination pages. Clear all caches after implementing new redirects and test redirects in a private/incognito browser window. If using WP Rocket, exclude query parameters used in redirect logic. Most caching plugins have WooCommerce-specific presets that you should enable.

How redirects affect SEO

Redirects aren’t just UX tools – they’re critical SEO elements.

When to use 301 vs 302 redirects

Use 301 (permanent) redirects for discontinued products, merged categories, or permanently restructured URLs. 301s pass 90-100% of SEO value to the target page. Use 302 (temporary) redirects for seasonal campaigns, temporary out-of-stock redirects, or A/B testing alternate product pages. 302s tell Google to keep the original URL in the index. Use 307 (temporary with method preservation) when redirecting POST requests like payment forms or checkout submissions – 307 ensures the HTTP method is preserved during the redirect.

Very simple notebook pencil sketch comparing 301 vs 302 vs 307 redirects with arrows and brief notes on when to use each for WooCommerce SEO

See our detailed guide on redirect types for technical implementation.

Redirects and duplicate content

Poor redirect configuration creates duplicate content issues. If you have /product/blue-shirt/, /product/blue-shirt/?color=blue, and /shop/clothing/blue-shirt/ all showing the same product, Google sees three competing URLs. Your SEO value splits across them.

Use canonical tags pointing all variations to one primary URL, or implement redirects to consolidate the URLs into one.

Internal linking and redirect architecture

Your redirect strategy impacts your site’s internal linking structure. When you redirect old product URLs, update internal links to point directly to new URLs instead of relying on redirects. Each redirect adds latency and burns crawl budget. If your breadcrumbs or category pages link to 50 redirected products, Google wastes crawl resources following those redirects instead of discovering new content.

ContentGecko’s catalog-synced content automatically updates internal links when product URLs change, preventing orphaned pages and redirect dependency.

Testing and monitoring redirects

Pre-launch testing checklist

Before deploying redirect changes, test each redirect type in incognito/private browser windows and on mobile devices (redirects can behave differently). Clear all caches and test again. Test with different user roles – guest, customer, admin. Verify cart contents persist through redirects, check that UTM parameters survive redirects, and test redirects with common payment gateways.

Monitoring tools

Monitor the Coverage report in Google Search Console for unexpected 404s or redirect errors. Look for “Redirect error” warnings, “Too many redirects” errors, and increased 404 pages after implementing redirects.

Check for redirect loops in your server logs:

Terminal window
# Check for redirect loops in Apache logs
grep "301\|302\|307" /var/log/apache2/access.log | grep -E "(/product/|/cart|/checkout)" | sort | uniq -c

Use redirect testing tools like Redirect Path (Chrome extension) to visualize redirect chains, httpstatus.io to test redirect behavior and response codes, and Screaming Frog SEO Spider to crawl your site and report all redirects.

Key metrics to track

Before and after redirect changes, monitor bounce rate on login/registration pages, cart abandonment rate, checkout completion rate, pages per session, time on site after login, and 404 error rate. If redirect changes increase bounce rate or decrease pages per session, you’ve sent users somewhere unhelpful. Revert and test alternate destinations.

Advanced redirect strategies

Dynamic redirects based on product availability

Send visitors away from out-of-stock products to available alternatives:

add_action('template_redirect', 'redirect_out_of_stock');
function redirect_out_of_stock() {
if (is_product()) {
global $product;
if (!$product->is_in_stock()) {
// Get products in same category
$terms = get_the_terms($product->get_id(), 'product_cat');
if ($terms) {
$category_id = $terms[0]->term_id;
$category_link = get_term_link($category_id, 'product_cat');
wp_redirect($category_link, 302); // Temporary redirect
exit;
}
}
}
}

Use 302 (temporary) because the product may return to stock. If the product is permanently discontinued, change to 301 and redirect to a specific replacement product.

Geo-based redirects

Send international visitors to region-specific stores or currency versions:

add_action('template_redirect', 'geo_based_redirect');
function geo_based_redirect() {
if (is_front_page()) {
$visitor_country = get_visitor_country(); // Use GeoIP service
if ($visitor_country == 'GB') {
wp_redirect(home_url('/uk-store/'), 302);
exit;
} elseif ($visitor_country == 'CA') {
wp_redirect(home_url('/canada-store/'), 302);
exit;
}
}
}

Google recommends against geo-redirects for SEO purposes. If you must use them, implement with 302s and allow Googlebot (US-based) to crawl your primary store.

First-time vs returning customer redirects

add_filter('woocommerce_login_redirect', 'smart_login_redirect', 10, 2);
function smart_login_redirect($redirect, $user) {
// Check if user has previous orders
$customer_orders = wc_get_orders([
'customer' => $user->ID,
'limit' => 1,
]);
if (empty($customer_orders)) {
// First-time customer: send to guided shopping
return home_url('/new-customer-products/');
} else {
// Returning customer: send to recommended based on history
return home_url('/my-account/');
}
}

This creates differentiated experiences without maintaining separate stores or user roles.

ContentGecko and redirect management

When you’re managing thousands of SKUs, manual redirect configuration doesn’t scale. ContentGecko’s catalog integration automatically handles several redirect scenarios.

When products are discontinued or URLs change in your WooCommerce catalog, ContentGecko updates internal links in all published content to prevent broken links. If you restructure categories, ContentGecko consumes the new hierarchy and adjusts internal linking and breadcrumb structure across all articles. During platform migrations, ContentGecko maintains content-to-product relationships even when URLs change – see our WooCommerce migration SEO guide for comprehensive migration planning.

This doesn’t replace your redirect configuration – you still need proper 301s for discontinued products and login/registration flows. But it eliminates the busywork of updating hundreds of internal links after catalog changes.

TL;DR

WooCommerce redirects control customer flow through your store. Poor redirect configuration causes cart abandonment (19% increase from broken checkout redirects), confused customers, and lost conversion tracking.

Configure these six redirect types: login, registration, logout, add-to-cart, product/category, and conditional redirects based on user role or cart contents. Use 301 redirects for permanent changes like discontinued products and restructured categories, and 302 for temporary moves like seasonal campaigns or out-of-stock products.

Common issues – login loops, checkout-to-cart redirects, redirect chains – typically stem from plugin conflicts (41% of sites with multiple redirect plugins), caching problems, or missing default WooCommerce pages. Fix by disabling plugins, clearing cache, and flushing permalinks.

Test redirects thoroughly before launch and monitor Google Search Console for redirect errors. For stores with large catalogs, consider ContentGecko’s automated content platform to maintain internal links when URLs change. Properly configured redirects increase customer engagement by 32% and prevent the SEO value loss that comes from duplicate content and broken links.