v2.36.0/Free plan includes 10 AI requests a day. No card needed.

Search and indexing

Redirects and the 404 monitor: keep old addresses alive

Add 301, 302, 307, 410 and 451 redirects, use regular expressions, import and export lists, bring redirects from another plugin, fix 404s people actually hit, and let the plugin redirect when a slug changes.

Time

10 minutes

What you need

  • The plugin installed

When an address on your site stops working, visitors and search engines lose the page, and the links and rankings it earned go with it. This part of OnlyAI SEO keeps those addresses alive.

Add a redirect

  1. Open OnlyAI SEO, Redirects.
  2. In From, type the old address (for example /old-page/).
  3. Choose Match: This exact address, Everything under this address, or Regular expression.
  4. In To, type where it should go.
  5. Choose the Type and press Add redirect.
TypeUse it when
301 moved for goodThe page moved for good. This is the usual choice.
302 moved for now / 307 temporaryThe move is temporary.
410 goneThe page is deleted and not coming back. Needs no target. The clearest signal to search engines.
451 legalThe page is unavailable for legal reasons. Needs no target.

With a regular expression you can reuse parts of the old address in the target with $1, $2: ^/product/([a-z0-9-]+)/?$ to /shop/$1/.

Safe by design

  • A rule cannot point at itself, and a circle between rules is refused.
  • If the target is already redirected somewhere, your rule is saved pointing at the final page, so visitors never go through two hops.
  • The home page cannot be redirected.
  • Only ordinary page requests are redirected. Nothing runs in the admin, in AJAX, in the REST API or in WP-Cron.

Everyday tools

  • Search the rules, edit, pause and resume them. Every rule shows a hit count and last-hit time.
  • Import a list: one per line like /old,/new,301 (the code is optional and defaults to 301). Lines starting with # are ignored.
  • Export CSV for a spreadsheet.

Bring redirects from another plugin

If Redirection, Rank Math or Yoast SEO Premium has saved redirects on your site, the Redirects page shows a button for each. One click copies them with the same checks as a rule you type. The other plugin keeps its own copy. Rules that depend on login, browser or referrer are skipped and listed; rules that were switched off arrive paused.

The 404 monitor

Below the rules is a list of addresses on your site that someone asked for and did not find, most requested first, with the page they came from. Press Redirect on a row to fill the form with that address, or Ignore to drop it. Probe scans (wp-login style, .php files) and static files are left out, and the log keeps only the most recent couple of thousand addresses. You can switch it off with Log 404 errors.

Automatic redirects

  • When a published post's address changes, the plugin adds a 301 from the old address to the new one by itself. Drafts never do. You can switch it off on the Redirects page.
  • When a published post is moved to the trash or deleted, choose to do nothing, answer its old address with 410 gone, or send it to the home page with a 301. Off by default. Restoring or republishing the post removes that rule.

The Link & 404 Keeper agent also watches the 404 log and suggests a redirect target. Inbox guide. On a multilingual site, include the language prefix in the address you redirect from (guide).

Next

Stuck?

We answer every email

Write to [email protected] with a short description and your plugin version. Or browse all guides, the troubleshooting page and the docs.

Email usTroubleshootingAll guides

More in Search and indexing