Redirects

Updated

Overview

When a page moves or is deleted, links to its old address lead to a "Page not found" error. A redirect sends anyone who follows the old address (visitors and search engines) straight to the page that replaced it, and search engines move the old page's ranking over to the new one.

SEO → Redirects lists your redirects and lets you add, change, turn off and delete them, import and export them as a spreadsheet, and copy them from another redirect plugin.

Add a redirect

  1. In the WordPress admin, go to SEO → Redirects.
  2. In Old address, enter the address that no longer works, such as /old-page/. You can paste the full address from your browser too.
  3. In New address, enter where it should go: a page on this site, such as /new-page/, or a full address on another site starting with https://.
  4. Choose a Type:
    • Permanent (301) for a page that has moved for good. Search engines replace the old address with the new one. This is the one to use most of the time.
    • Temporary (302) for a page that's away for a while, such as a seasonal page sending visitors elsewhere until it's back.
    • 307 and 308 are the temporary and permanent kinds for forms that post to the old address. You rarely need them.
    • Gone (410) tells visitors and search engines the page was removed on purpose and nothing replaces it. Visitors see your "Page not found" page.
  5. Add a Note if it helps whoever looks next, then select Add Redirect.

The redirect works straight away. You need an Administrator or Manager account.

How addresses are matched

  • Capital letters and a slash at the end don't matter: /Old-Page, /old-page and /old-page/ are the same address, just as they are for your pages.
  • Anything after a ? in the visitor's address is ignored and passed on to the new address, so campaign tags such as ?utm_source=newsletter keep working.
  • To redirect one exact query only, such as an old /products.php?id=5, include it in the old address. That redirect then only matches that query (in any order).
  • End the old address with * to cover everything that starts with it. /old-blog/* redirects /old-blog/ and every address below it. Put * at the end of the new address too (/news/*) to keep the rest of the address: /old-blog/spring-sale/ goes to /news/spring-sale/.
  • The home page and WordPress's own addresses (sign-in, admin, files) can't be redirected from here, and an address ending in * needs at least two letters before the *.
  • Addresses start after your domain name. If WordPress lives in a folder (example.com/site/), include the folder in both addresses: /site/old-page/ to /site/new-page/.

Loops and chains

A redirect that would send visitors round in a circle can't be saved; the screen says which redirect it clashes with. Visitors also never go through two redirects in a row:

  • If the new address already redirects somewhere, your redirect goes straight to the final page instead.
  • If other redirects pointed at the address you're redirecting, they're moved along to its new address.

The message after saving says when either happened.

Change, turn off or delete redirects

  • Edit opens a redirect in the form at the top. Untick Redirect visitors to keep it in the list but stop it working.
  • Turn off and Turn on do the same from the list. Delete removes it for good.
  • To change many at once, tick them (or the box at the top of the list to tick the page), choose Turn on, Turn off or Delete under Bulk actions, and select Apply.
  • Search finds redirects by either address or the note. All, On and Off filter the list.
  • Hits counts how many times each redirect was used, and Last used says when. Visits answered from a cache along the way aren't counted, so the real number can be higher. A redirect nobody has used in a year is usually safe to delete.

Import and export

Export CSV downloads every redirect as a spreadsheet you can open in Excel, Numbers or Google Sheets.

To add many at once, select Choose File, pick a CSV file and select Import CSV. The file needs the columns source (old address), target (new address), status (301, 302, 307, 308 or 410), enabled (1 or 0) and note, either in that order or with those names in the first row. Only source and target are needed: the type defaults to 301, and each redirect starts on. An old address that's already in the list is updated rather than added twice. Rows that can't be saved are listed with the reason, and the rest are still imported. A file can hold up to 5,000 redirects.

Moving from Redirection, Yoast SEO Premium or Rank Math

When one of these plugins is active, SEO → Redirects shows how many of its redirects can be copied, how many are already here, and which can't be copied and why. Select Copy to bring them over. Nothing changes until you do, and the other plugin's redirects stay exactly as they are.

  • Plain redirects from one address to another and 410s are copied, switched on or off as they were, with their hit counts.
  • Redirects that depend on more than the address (whether the visitor is signed in, where they came from, their browser) or use complex patterns aren't copied. Simple "starts with" patterns are.
  • While the other plugin is active, its redirects run first, so an address both list is only redirected once. Check the list, then turn the other plugin off under Plugins (an Administrator can) and Dirigible SEO's copies take over. Its 404 log goes with it: Pages not found then keeps its own record.
  • Turn the other plugin off (don't delete it) for a while. If Dirigible SEO were ever put back to a version older than this feature, the copied redirects would stop working until it's updated again, and turning the other plugin back on restores them.

When a redirect runs

A redirect runs when its old address would otherwise show "Page not found". A plain old address (no * and no ?) that's a post or page that's still published is redirected too: the redirect wins, so you can redirect a page without deleting it first. An old address with * or ?, or one that still shows a category, tag or other archive page, only redirects once nothing is shown there.

Redirects cost nothing on your other pages: Dirigible SEO only looks them up for addresses that would show "Page not found", or that you've redirected.

Tips

  • A new or changed redirect for an address that showed "Page not found" usually works straight away: the hosting cache passes those addresses and redirects through to your site, though it may hold the old answer briefly.
  • If the old address still shows a page, visitors may get the host's cached copy of that page for a while. Purge the site cache (Rocket.net: Purge Cache) or update that page for everyone to be redirected at once.
  • Browsers remember a permanent redirect for an hour, so if you change one, a visitor who just used it may need to wait that long to see the change.
  • Pages not found suggests a redirect for each missing address it can match, with a one-click Create redirect.
  • Deleting Dirigible SEO keeps your redirects, so reinstalling it brings them back.

Built by Dirigible Studio. Get in touch