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
- Open OnlyAI SEO, Redirects.
- In From, type the old address (for example
/old-page/). - Choose Match: This exact address, Everything under this address, or Regular expression.
- In To, type where it should go.
- Choose the Type and press Add redirect.
| Type | Use it when |
|---|---|
| 301 moved for good | The page moved for good. This is the usual choice. |
| 302 moved for now / 307 temporary | The move is temporary. |
| 410 gone | The page is deleted and not coming back. Needs no target. The clearest signal to search engines. |
| 451 legal | The 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).