[00] Subset Redirects, User guide
Getting started
Last updated
Install Subset Redirects, add your first redirect, work through the 404 log and bring redirects over from another plugin.
This page gets you from a fresh install to working redirects. It covers adding a redirect, testing it, reading the 404 log, importing from another plugin and what Pro adds.
Install
- Download the free Subset Redirects zip from subsetwp.com/download/redirects.
- In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip and click Install Now.
- Click Activate.
Subset Redirects needs WordPress 6.0 or later and PHP 8.1 or later. Everything lives under Subset → Redirects, in five tabs: Redirects, 404 Log, Import & Export, Settings and About.
The 404 log starts recording as soon as the plugin is active. There are no redirects until you add one, and a site with no enabled redirects runs no extra database queries.
Add a redirect
- Go to Subset → Redirects and click Add redirect.
- In From, enter the old address as a path, like
/old-page. - Pick a Type: 301 Permanent, 302 Temporary or 410 Gone.
- In To, enter where visitors should go, like
/new-page. Leave it empty for a 410. - Click Add redirect.
The redirect works straight away. If you’re not sure which type to use, read status codes. Browsers cache a 301, so a wrong one can outlast the redirect.
The form has a few more fields:
- Query string decides what happens to
?a=1on the end of a request. Ignore query string (the default) matches any query string. Exact query string only matches the query string you put in From. Pass query string to target matches any query string and adds it to the target. - Allow a target on another site lets To be a full URL on a different domain. It’s off by default, so nobody can use your site to send visitors somewhere unexpected.
- Group and Notes help you organise and filter a long list.
- Enabled turns the redirect off without deleting it.
Subset Redirects refuses to save a redirect that would create a loop, and tells you which redirects are involved.
Test a URL
Use the Test a URL box on the Redirects tab to check what a visit does before you trust it. Enter a path and click Test. You’ll see which redirect matches, where it sends the visitor, and any further redirects after it. It warns you if those redirects lead back to the start.
From the command line, wp subset redirector redirect test /old-page does the same check.
Automatic redirects
When you change a published post’s or page’s slug or parent, Subset Redirects adds a redirect from the old URL, including for child pages. It does the same when a category’s, tag’s or other term’s slug changes. This is on by default.
To change it, go to Subset → Redirects → Settings and look under Automatic redirects. You can choose which post types and taxonomies to watch. You can also turn on Send “410 Gone” for published posts that are trashed or deleted, which is off by default.
Automatic redirects show URL change as their origin in the list, so you can filter for them.
Work through the 404 log
Open Subset → Redirects → 404 Log. Each row is a URL a visitor asked for and didn’t find, with a hit count, when it was first and last seen, and the latest referrer. Top open 404s this week at the top shows the busiest ones.
For each entry you can:
- Create redirect to send that URL somewhere useful. Saving the redirect marks the 404 resolved.
- Ignore it, so it stops being logged.
- Mark resolved once you’ve fixed it some other way.
Select several rows and use the Redirect to… bulk action to point them all at one target. Use Ignore a pattern to stop logging a whole family of URLs, like /wp-content/uploads/*.
What the log leaves out
The log is built so it can’t fill your database:
- Scanners, scripts and SEO tools aren’t logged, and nor are requests with no user agent. Search engine crawlers such as Googlebot are logged, because their 404s are usually real broken links.
- Common probe paths like
/.envand/wp-config.php.bakaren’t logged. You can edit the list under Settings → Ignored URLs. - New URLs are limited to 60 a minute, and the log stops adding new URLs at 10,000 entries. URLs already in the log keep counting hits.
- Entries not seen for 30 days are deleted daily.
- A page cache or CDN can serve a cached 404 without running WordPress. Those hits never reach the log.
The log stores the URL, referrer, user agent, hit count and dates. It never stores IP addresses. On a busy site, set Logging to Log a sample (for busy sites) to log about one 404 in ten, or turn it off.
Import and export
Go to Subset → Redirects → Import & Export.
- Import redirects takes a CSV file. You see what each row will add, update, skip or reject before anything is saved.
- Export redirects downloads every redirect as a CSV in the same format. To export only some, filter the Redirects list and click Export these as CSV.
- Import from another plugin reads redirects from Redirection, Yoast SEO Premium or Rank Math. The other plugin doesn’t need to be active, as long as its data is still in the database.
Imports from another plugin never change a redirect that already exists, so running one twice is safe. A CSV row for a source that already has a redirect updates that redirect if any value differs, and the preview lists it under Update. Redirects that Subset Redirects can’t handle are listed with the reason. In the free plugin, that includes regular expressions. A 307 becomes a 302, and a 308 becomes a 301.
The CSV columns are listed in the developer reference.
Chains, loops and page caches
A chain is a redirect that points at another redirect. Each hop adds a round trip. Subset Redirects flags chains in Tools → Site Health under Redirect chains and loops, and the Test a URL box shows the hops for any address. Pro can rewrite chains to point straight at the final page.
When you save or delete a redirect, Subset Redirects purges that URL from WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and SiteGround Optimizer. If you use another cache, such as your host’s or a CDN like Cloudflare, purge it by hand. If you still see the old page, test in a private window: your browser remembers 301s.
Uninstalling
Deleting the plugin keeps your redirects, 404 log and settings, so reinstalling picks up where you left off. To remove everything, first turn on Delete all redirects, the 404 log and these settings when the plugin is deleted under Settings → Uninstalling. On multisite, each site decides for itself.
Subset Redirects Pro
Pro is a separate add-on that needs the free plugin. Install its zip the same way, then open Subset → Redirects → License, enter your licence key and activate it. An active licence gets you updates and support.
Pro adds:
- Wildcard and regular expression redirects. Redirect
/old/*to/new/$1, or/blog/(\d{4})/(.*)to/articles/$2. Pick the type in the redirect form’s Match field, and use Test the pattern to try it on a URL before saving. Patterns only apply when no exact redirect matches. Subset Redirects refuses patterns that could hang the server. - Suggested redirects for 404s. The 404 log gets a Suggested redirect column with the most likely existing page and a confidence score. Accept one, a selection, or every suggestion above a threshold.
- Chain flattening. The Chains tab lists every chain and rewrites the ones you tick to go straight to the final page. Where visitors land never changes.
- Server rules. The Server rules tab turns your redirects into Apache (
.htaccess) or nginx rules for you to copy. Pro never writes to your server configuration. - Hit statistics. Each redirect’s edit screen shows a 30-day chart of daily hits, and the list gets a filter for redirects not hit in 30, 90, 180 or 365 days.
- After migration. With Subset Sync, this tab lists pages that 404 after a migration, with a suggested redirect for each.
Get help
Report bugs and request features at subset-feedback on GitHub (opens in a new tab). For anything else, email hello@subsetwp.com.
What to read next
- Status codes explains each redirect code and when to use it.
- The developer reference lists every hook, WP-CLI command and REST route.