Back to Community

How to Fix Common Rank Math Redirect Issues: A Troubleshooting Guide

38 threads Sep 16, 2025 PluginRank math seo

Content

Rank Math SEO's redirection module is a powerful tool, but users often encounter specific problems when setting up complex rules. Based on common community reports, this guide addresses the most frequent redirect issues and their solutions.

Common Redirect Problems and Their Solutions

1. Redirecting URLs with Query Parameters

Problem: Redirecting URLs that contain specific query parameters (e.g., ?expand_domains=1) to a clean version without the parameter.

Solution: Use a Regex redirect rule in Rank Math.

  • Source URL: (.*)/?expand_domains=*
  • Destination URL: https://www.yourdomain.com/$1
  • Type: Regex

Important: To prevent a redirect loop, you may need to apply a custom filter code to your website. The Rank Math team provides a code snippet for this in their knowledge base under "Redirect Remove Query."

2. Redirecting After Changing Permalink Structures

Problem: Changing a site-wide permalink structure (e.g., from /%postname%/ to /%postname%1/) does not trigger automatic 301 redirects from the old URLs to the new ones.

Why it Happens: Rank Math's "Auto Post Redirect" feature only works when you change the slug of an individual post or page. It does not handle global changes to the permalink structure made in WordPress Settings > Permalinks.

Solution: You must manually create redirects for the old structure. For a site-wide change, this can be done with a single Regex rule.

  • Source URL: (.*)
  • Destination URL: https://yourdomain.com/$11
  • Type: Regex

Note: For complex migrations, a dedicated redirection plugin might be more effective.

3. Removing Category or Taxonomy Bases

Problem: You want to change a URL like /product-category/step-1/porcelain/ to /product-category/porcelain/ by stripping out a segment, or completely remove the base like /product-category/.

Solution: Use Regex redirects. The exact rule depends on your goal.

  • To strip a middle segment (e.g., 'step-1'):
    • Source URL: product-category/step-1/(.*)
    • Destination URL: https://yourdomain.com/product-category/$1
    • Type: Regex
  • To remove the category base entirely (e.g., to change /product-category/phones/ to /phones/): Enable the "Remove Category Base" option in Rank Math's WooCommerce settings. If this causes a 404, you may need to create a manual redirect.
    • Source URL: product-category/(.*)
    • Destination URL: https://yourdomain.com/$1
    • Type: Regex

Limitation: The built-in "Remove Category Base" feature only works for standard and product categories. It cannot remove the base for custom taxonomies. For that, a permalink manager plugin is typically required.

4. Regex Redirects Not Working

Problem: You've created a Regex rule, but it doesn't trigger.

Why it Happens: Common causes include incorrect Regex syntax or a leading slash in the source URL.

Solution: Double-check your rule format.

  • Ensure the "Match" type is set to "Regex" for the rule.
  • Do not include a leading slash in the Source URL field. For example, use product-category/(.*) instead of /product-category/(.*).
  • Test your rule with a few sample URLs to ensure the pattern matches correctly.

What Rank Math Redirects Cannot Do

It's important to understand the limitations of the plugin's redirection module to choose the right tool for the job.

  • Domain-Level Redirects: Rank Math cannot redirect absolute paths between different domains (e.g., from en.example.com/about to en.example.com/about-us in a multi-domain setup). This must be configured at the server level via .htaccess.
  • WWW/Non-WWW: Redirecting all traffic from a www version to a non-www version (or vice versa) is a server configuration task, not something handled within the plugin.
  • Full Domain Change: Moving a site from one domain to another (e.g., site.com to site.net) requires a server-wide 301 redirect, which should be set up by your hosting provider.

Final Checklist

  1. For query strings, use Regex and consider anti-loop filters.
  2. For permalink structure changes, create manual Regex rules.
  3. For category/taxonomy changes, use the built-in option if available, or craft a precise Regex rule.
  4. Always omit the leading slash in Source URLs for Regex rules.
  5. For server-level redirects (domains, www), contact your hosting support.

By following this guide, you should be able to resolve the majority of common redirection challenges encountered with the Rank Math SEO plugin.

Related Support Threads Support