Back to Community

How to Exclude URLs from Redirection Rules in WordPress

14 threads Sep 10, 2025 PluginRedirection

Content

A common challenge when using the Redirection plugin is creating a broad rule, only to find it's also affecting specific URLs you want to leave alone. Users often report that the "Do Nothing" action doesn't seem to work for excluding these URLs. This guide explains why this happens and provides the most effective solutions.

Why the "Do Nothing" Action Might Seem to Fail

Based on community reports, the "Do Nothing" action is functional, but its success depends on two critical factors that are often overlooked:

  1. Rule Order: Redirection processes rules from top to bottom. A specific "Do Nothing" rule must be placed above any general rule that would otherwise match the same URL. If a general regex rule higher up the list matches a URL first, the later "Do Nothing" rule will never be triggered.
  2. Caching: Both WordPress and server-side caching can serve old redirects. If you change a rule but don't clear all relevant caches, you will continue to see the old (cached) behavior, making it appear as if your new rule is not working.

How to Successfully Exclude URLs

Follow these steps to correctly set up URL exclusions.

Step 1: Create the "Do Nothing" Rule

First, create a new redirect for the exact URL or pattern you wish to exclude.

  1. In your WordPress admin, go to Tools > Redirection.
  2. Click Add New to create a redirect.
  3. Enter the source URL you want to exclude. For a single, specific URL, enter it directly (e.g., /blog/my-news-article/). To exclude a pattern, you may need a simple regex.
  4. Set the Action to "Do Nothing (ignore)".
  5. Click Add Redirect.

Step 2: Check the Rule Order (Crucial Step)

After creating the rule, you must ensure it is positioned correctly.

  1. On the main Redirection page, view your list of redirects.
  2. Find your new "Do Nothing" rule. Click and drag it using the handle on the left side of the table to place it above any broader, matching rules.

Step 3: Clear All Caches

To ensure your changes take effect immediately, clear all caching layers:

  • Clear your WordPress caching plugin's cache (if you use one like WP Rocket, W3 Total Cache, etc.).
  • Clear any server-level or CDN caches (e.g., Cloudflare). Your hosting provider's control panel typically has this option.
  • Clear your browser cache or test in a private/incognito window.

Alternative Solution: Refine Your Regex

Sometimes, a better approach is to refine your original redirect rule to be more specific so it doesn't match the URLs you want to exclude in the first place. This is often more efficient than managing multiple rules. The Redirection support site has extensive documentation on using regular expressions to create precise matching patterns.

Conclusion

The "Do Nothing" feature is a powerful tool for creating exceptions within your redirect strategy. The most common reasons for it not working are incorrect rule order and caching. By carefully ordering your rules and ensuring caches are cleared, you can successfully exclude any URL from being redirected.