This guide is for WordPress site owners, bloggers and agency staff who are about to change a URL, delete a post, merge two articles or move to a new domain, and want to keep their visitors and search visibility intact. It explains which redirect to use, how to set it up with free tools, and how to confirm that it works.
Contents
- Why redirects matter when a URL changes
- Permanent or temporary: choosing the right redirect
- Server-side redirects first
- Method 1: Rank Math's Redirections module
- Method 2: The Redirection plugin
- Redirect to something relevant, not the homepage
- Avoid chains and loops
- Moving to a new domain
- How to check that a redirect works
- Key takeaways
- FAQ
- Sources
Why redirects matter when a URL changes
A redirect sends visitors and crawlers from one URL to another. Google’s Search Central documentation lists several reasons to use one: moving to a new domain, consolidating multiple URLs for the same page into a single canonical URL, merging websites, and removing a page while sending people to a replacement.
Without a redirect, anyone who follows an old link, bookmark or search result lands on an error page.
Permanent or temporary: choosing the right redirect
Google describes two groups. Permanent redirects tell Google that the target should be the canonical URL, so the target is what appears in search results. Temporary redirects keep the source page in search results, although the target may still be indexed if other canonical signals point to it.
Enjoying this? Get our best tips by email
Practical SEO, link building and content strategies, straight to your inbox.
| Situation | Redirect to use | Why |
|---|---|---|
| Changed a post slug or permalink for good | 301 (or 308) | The new URL should replace the old one in search results |
| Merged two articles into one | 301 from the old article to the merged one | Google says redirecting several old pages to one consolidated page is acceptable |
| Moved to a new domain | 301 (or 308) for every old URL | Signals move to the new site |
| Page is unavailable for a short time | 302 or 307 | The original URL should stay in results |
| Deleted a post with no replacement | 404 or 410, not a redirect | Google advises returning 404 or 410 for URLs you are not moving |
Google’s advice is to use a permanent redirect only when you are sure it will not be reverted, and a temporary one for short-term situations such as a service that is temporarily unavailable. If you are unsure, ask whether the old URL will ever come back. If it will, use a temporary redirect.
Server-side redirects first
Google says a server-side redirect (an HTTP 3xx response) is the method most likely to be interpreted correctly; meta refresh and JavaScript redirects are fallbacks. WordPress redirect tools handle this for you.
Method 1: Rank Math’s Redirections module
If Rank Math is already installed, you do not need another plugin. According to Rank Math’s documentation, the steps are:
- Go to Rank Math SEO in the WordPress dashboard and turn on the Redirections module. If you cannot see it, switch on Advanced Mode under Rank Math SEO, Dashboard.
- Go to Rank Math SEO, Redirections and click Add New.
- Enter the old URL as the source. Choose a match type: Exact, Contains, Starts With, End With or Regex. For a single moved post, Exact is the least risky.
- Enter the full destination URL.
- Choose the type. 301 Permanent Move is for permanent changes; 302 Temporary Move and 307 Temporary Redirect are for temporary ones. The 410 Content Deleted and 451 options need no destination.
- Leave the status on Activate (or disable it to prepare a redirect and switch it on later) and click Add Redirection.
Rank Math’s page warns that URLs are case-sensitive, so tick Ignore Case only if no uppercase variant of the URL leads to a different page.
Automatic redirects when you edit a slug
Rank Math also has an Auto Post Redirect option under Rank Math SEO, General Settings, Redirections. Its documentation says WordPress already redirects old URLs on its own when you change a post’s slug, but only for posts, while Rank Math’s option also covers pages, taxonomies and custom post types. Redirects created this way are always 301. For a bulk change to your permalink structure, Rank Math recommends creating a manual regex redirect instead. Before changing URLs, see our URL optimization best practices.
Method 2: The Redirection plugin
If you do not use Rank Math, or want a dedicated tool, the Redirection plugin on WordPress.org is free, and its listing states there is no premium version. According to that listing, it can manage 301 redirects without server knowledge, track 404 errors so you can redirect them in bulk, log redirect hits, and be set to create a redirect automatically when a post or page permalink changes. It can also save redirects to an .htaccess file for Apache or export Nginx rewrite rules, and import and export redirects as CSV or JSON.
The listing gives the requirements as WordPress 6.7 or higher and PHP 7.4 or higher at the time of writing. One recent review on the listing reports that after a WordPress update the plugin caused pages to redirect to a 404 until it was deactivated. That is a single user report, but it is a reason to take a backup before adding any redirect plugin. Use one redirect tool at a time so rules cannot conflict.
Redirect to something relevant, not the homepage
When deleting a post, it is tempting to send every old URL to the homepage. Google’s site-move guidance advises against sending many old URLs to one unrelated page, such as the new home page, because this can be treated as a soft 404. A redirect should go to the page that best replaces the old one: the merged article, the updated version, or the closest category page. If nothing relevant exists, let the URL return a 404 or 410 and fix the internal links instead.
Our walkthrough on how to refresh old blog posts covers updating instead of deleting, which often avoids the redirect altogether.
Avoid chains and loops
A redirect chain happens when URL A redirects to B, which redirects to C. Google’s site-move page says Googlebot can follow up to 10 hops, but you should redirect directly to the final URL. If that is impossible, it suggests keeping chains to about 3 hops and fewer than 5.
A loop is worse: A redirects to B and B redirects back to A, so the page never loads. Rank Math’s documentation links to a help article about the warning that a redirection you are creating may cause infinite loops, so the plugin does attempt to flag this.
Moving to a new domain
A domain move is bigger than a single redirect. Google’s site-move documentation recommends these points:
- Change one thing at a time, for example the domain first, then the theme or layout later.
- Build a mapping of every old URL to its new destination, using sources such as your sitemap, server logs, analytics, Search Console’s links report and your CMS URL list.
- Give each new page a self-referencing canonical tag, and update internal links.
- Verify both the old and new sites in Search Console, including all variants.
- Use the Change of Address tool only for moves between domains or subdomains, not for HTTP to HTTPS, www changes or path changes.
- Submit the new sitemap and remove the old one.
- Keep the redirects for at least one year, and consider keeping them indefinitely.
How to check that a redirect works
Browser developer tools
In Chrome DevTools, open the Network panel, tick Preserve log so requests are kept across page loads, then load the old URL. The Status column shows the codes, so you want to see a 301 followed by a 200 for the destination. Select the redirecting request and open its Headers tab to read the response headers, where the new address is given. More than one redirect before the final 200 means you have a chain to shorten.
Search Console URL Inspection
Paste the URL into the inspection bar in Google Search Console. Google’s help page explains that for a redirected URL, the indexed results describe the tested URL, not the target, and that you can click Inspect in the Page indexing section to see results for the canonical of the redirected page. The Test live URL option follows redirects but, according to Google, does not tell you it did so or show the final URL it tested. So use DevTools to see the path taken, and URL Inspection to see how Google treats the pages. If you find crawl problems after a change, our guide to fixing crawl errors in Google Search Console shows how to work through them.
Key takeaways
- Use a 301 or 308 when a change is permanent and a 302 or 307 only when it is temporary.
- Redirect to the closest relevant page; if none exists, return 404 or 410.
- Point old URLs directly at the final destination to avoid chains and loops.
- Test with browser DevTools and Search Console URL Inspection.
- For a domain move, keep redirects for at least a year.
FAQ
Does a 301 redirect lose link value?
Google’s site-move documentation states that 301 and other permanent redirects do not cause a PageRank loss. Google does warn that rankings can fluctuate during a move.
How long should I keep a redirect?
For a site move, Google says to keep redirects for at least one year, and to consider keeping them indefinitely.
Do I need the Change of Address tool?
Only for a move between domains or subdomains. Google says not to use it for HTTP to HTTPS, switching between www and non-www, or path changes.
