Skip to content
WP Visibility

Everyday SEO

Redirect a Changed URL

Turn the Redirects module on, add a rule with a source path, a target and a status, and check it. Slug changes get a 301 automatically, loops are refused, and chains are flagged.

Updated September 22, 2026

Docs

Turn on Redirects under WP Visibility → Settings → Modules, then open the new WP Visibility → Redirects page. Under Add a redirect, enter the old path as the Source (/old-page/), the new address as the Target (/new-page/ or a full URL), leave Status at 301, and click Add redirect. Open the old address in a private window to confirm it lands on the new one.

Turn the module on

The module is off by default. Once on, Redirects appears in the WP Visibility menu and the rules table is created. Turning the module off later keeps the rules but stops them firing.

Create a redirect

Field What to enter
Source A path on this site starting with /. A full URL on your own domain is accepted and reduced to its path; a URL on another host is refused. The query string is dropped and a trailing slash is ignored, so /old-page and /old-page/ are the same rule.
Target A path like /new-page/, or a full http(s) URL, on this site or another. A bare word such as new-page is refused rather than guessed at.
Status 301 by default. See the table below.
Regular expression Match the source as a pattern instead of an exact path. Patterns match anywhere in the path unless you anchor them with ^ and $, and $1, $2 work in the target.

A second rule for the same source is refused: “A redirect for this source already exists.” Edit the existing one instead. The table shows each rule’s hit count, and rules can be searched, edited inline and deleted.

Status codes

Code Meaning Target
301 Moved permanently Required
302 Found, temporary Required
307 Temporary, keeps the request method Required
308 Permanent, keeps the request method Required
410 Gone: the page is deliberately removed None. The old address answers 410 in place
451 Unavailable for legal reasons None

Use 301 for a page that moved. Use 410 for a page that is gone with no replacement; it tells engines to drop the URL faster than a 404 does.

Slug changes are handled for you

While the module is on, changing the slug of a published post, page or public custom post type entry creates a 301 from the old path to the new one, or updates an existing rule for that old path. Two housekeeping steps run at the same time: rules that pointed at the old path are rewritten to point at the new one, so no chain forms, and any rule that would redirect visitors away from the now-live URL is deleted, so no loop forms. Drafts, revisions, plain ?p=123 permalinks and the front page are not touched.

Loops and chains

  • A rule whose target leads straight back to its own source is refused: “The target redirects straight back to the source.”
  • A rule whose target is itself the source of another rule is saved with a warning: visitors will be redirected twice. Point the first rule at the final destination instead. The plugin issues one redirect per request; it does not collapse chains on the fly.

How matching works

Every front-end request is checked before WordPress renders anything. An exact-path rule is one indexed lookup; regular expression rules are tried afterward, in the order they were created, up to 200 of them. Matching is case-sensitive. The visitor’s query string is passed through to the target. Hits are counted after the response is sent, and HEAD requests are not counted.

A rule whose source matches a page that still exists takes that page over, so point rules at addresses you have retired.

Import rules from another plugin

Under Import from a CSV on the Redirects page, choose the file, click Preview CSV, read the result, then Import CSV. The preview validates every row and shows the first ten; nothing is written until the import. Three layouts are recognized by their header row:

Layout Header Notes
WP Visibility source,target,status,is_regex A file with no header is read in this order. status defaults to 301.
Redirection plugin export source,target,regex,type,code,match,hits,title Rows whose match type is not url (referrer, user agent, login, IP rules) are skipped.
Rank Math redirections CSV id,source,matching,destination,type,category,status The Rank Math PRO export. exact and regex rows import; contains, start and end are skipped with a message; inactive rows are skipped.

Each run handles up to 5,000 rows, lists the first 50 problems by row number, and skips duplicates of rules that already exist. Yoast Premium and SEOPress exports are not recognized; reshape them into the three-column layout. There is no CSV export.

The same import is available over REST at POST /wp-json/wpvis/v1/redirects/import-csv with the file in a file field; dry_run defaults to true. Rules can also be listed, created, updated and deleted at /wp-json/wpvis/v1/redirects. Both need manage_options and do not pass through the review queue.

One page, without the module

The editor sidebar has a Redirect (301) to field on every post. It sends that post’s own address to the URL you enter, permanently, and works whether or not the Redirects module is on. It does not create a rule in the table. Use it for a single retired page; use the module for anything else.

Check it

curl -sI https://your-site.com/old-page/ | grep -i "^HTTP\|^location"

Expect HTTP/2 301 and a location: header with the target. Then check the target itself returns 200, and that the old URL is not also listed in your sitemap (a redirected post that is still published is; trash or noindex it).