Documentation
Redirects, the 404 monitor and breadcrumbs
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.
Redirects
Open OnlyAI SEO, Redirects. Type the old address, where it should go and the kind of redirect, then press Add redirect.
- Match. This exact address, everything under an address (a prefix), or a regular expression. 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/. - Type. 301 moved for good (the usual choice), 302 or 307 for a temporary move, 410 gone and 451 unavailable for legal reasons (these two need no target).
- Safe by design. A rule cannot point at itself. If the target is already redirected somewhere, your rule is saved pointing at the final page, so visitors never go through two hops. A circle between rules is refused. The home page cannot be redirected.
- Everyday tools. Search, edit, pause and resume, a hit count and last-hit time for every rule, import a list (one per line:
/old,/new,301) and export everything as CSV. - Only ordinary page requests (GET and HEAD) are redirected. Nothing runs in the admin, in AJAX, in the REST API or in WP-Cron.
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 here with the same checks as a rule you type in (no circles, no chains). The other plugin keeps its own copy. Rules that depend on login state, browser or referrer are skipped and listed, and rules that were switched off arrive paused. Rank Math's "contains" and "ends with" become regular expressions.
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 and when they were last seen. Press Redirect on a row to fill the form with that address, or Ignore to drop it. Requests for probe addresses (wp-login-style scans, .php files) and static files such as CSS and JavaScript are left out, and the log keeps only the most recent couple of thousand addresses. You can switch it off on the same page.
When a post is moved to the trash
An option on the same page: when a published post is moved to the trash or deleted, answer its old address with 410 gone (the clearest signal for search engines) or send it to the home page with a 301. Restoring or republishing the post removes that rule. Off by default.
When a post's address changes
If you change the address (slug) of a published post or page, or move it under another parent, OnlyAI SEO adds a 301 from the old address to the new one by itself. Drafts never do. If the new address had once been redirected away, that rule is removed so it cannot loop. You can switch this off on the Redirects page.
Breadcrumbs
Show the trail to the current page (Home, category, post) in any of three ways:
- the Breadcrumbs block in the OnlyAI SEO group, with a separator, a home label and a switch for the current page;
- the shortcode
[onlyai_breadcrumbs separator="/" home="Start" current="1"]; - in a theme template:
<?php onlyai_seo_breadcrumbs(); ?>.
On posts the trail follows the deepest category and its parents; on pages it follows the parent pages; on archives, authors, search and 404 pages it shows a sensible trail. The markup is a plain navigation list that takes on your theme's fonts and colours, and the current page is marked for screen readers. The same trail feeds the breadcrumb data OnlyAI SEO gives search engines.