SEO basics
301, 302, 307 or 410? Which redirect to use in WordPress
13 October 2026 · 2 min read
A plain explanation of redirect types, when to use each, the mistakes that waste rankings (chains, loops, redirecting everything to the home page), and how to set them up safely.
A redirect sends visitors and search engines from one address to another. Choosing the wrong kind is one of the quietest ways to lose traffic. Here is what to use.
The types
| Code | Meaning | Use it when |
|---|---|---|
| 301 | Moved permanently | A page has a new address for good: a changed slug, a merged post, a new domain. Passes the old page's signals to the new one. The usual choice. |
| 302 / 307 | Moved temporarily | The move is short-lived: a page is down for maintenance, or you are testing a replacement. Search engines keep the old address. |
| 410 | Gone | The page was deleted on purpose and has no replacement. The clearest signal to search engines that it will not come back. |
| 451 | Unavailable for legal reasons | Content removed because of a legal demand. |
Common mistakes
- Redirecting every deleted page to the home page. Search engines often treat that as a "soft 404", and visitors land somewhere unrelated. Redirect to the closest matching page, or use 410.
- Redirect chains: A to B to C. Each hop slows the visitor and loses a little. Point the old address straight at the final one.
- Redirect loops: A to B to A. The page never loads.
- Using 302 for a permanent move. The old address can stay in results.
- Forgetting the 404s people actually hit. Old links from other sites keep sending visitors to pages that do not exist.
How OnlyAI SEO helps
- A rule cannot point at itself, a loop between rules is refused, and if the target is already redirected your rule is saved pointing at the final page, so there are no chains.
- When you change a published post's address, a 301 from the old one is added for you.
- When a published post is trashed, you can answer its old address with 410 or send it to the home page.
- The 404 monitor lists the addresses people ask for and do not find, most requested first, with the page they came from. Press Redirect on a row to fix it.
- Regular expressions let one rule handle a whole group, for example
^/product/([a-z0-9-]+)/?$to/shop/$1/.
Step by step: Redirects and the 404 monitor. Bringing redirects from another plugin: Rank Math, Yoast SEO Premium.
Test before you rely on it
Open the old address in a private browser window (browsers cache 301s hard) and check it lands where you expect. If it does not, a page cache or the host's own rules may be answering first.