Skip to content
Passieon

WordPress redirects after you change a URL

By Hamza Rivera, updated

Short answer: After you change a URL in WordPress, set a permanent redirect from the old address to the new one. Google treats permanent redirects as a signal that the target should be the canonical page and recommends a server-side redirect whenever possible. Use a temporary redirect only if the move is not permanent, and avoid JavaScript redirects unless nothing else is possible.

Renaming a page, moving it, or changing your permalink structure changes its address. Anyone who saved or linked to the old address, and Google, still go there. Without a redirect they land on an error page.

If you are about to change URLs on a WordPress site, our WordPress SEO services.

Permanent or temporary

Google splits redirects into two kinds. A permanent redirect, such as a 301 or 308, is used when the redirect will not be reverted. Google reads it as a signal that the target should be the canonical page and shows the new address in results. A temporary redirect, such as a 302 or 307, tells Google to follow the redirect but keep the source page in results. For a URL you changed on purpose, you want the permanent kind.

Which method to use

Google recommends a permanent server-side redirect whenever possible. A meta refresh is a fallback, and Google reads an instant one as permanent and a delayed one as temporary. JavaScript redirects are a last resort, because Google may never see them if rendering fails. On a WordPress site, server-side redirects are set up through your host or a redirect plugin. Check which your setup uses before you change anything.

Send each old page to its closest match

Redirect each old address to the new address for the same content. Sending every old page to the home page leaves visitors and Google without the page they wanted. Our guide to WordPress permalinks explains why a structure change touches every post at once.

Old addresses may linger for a while

Google notes that after a redirect it may keep showing the old URL in results, and that the alternate names fade away without you doing anything. Do not take the old name appearing for a while as a sign the redirect failed. Open the old address in a browser to confirm it lands on the new one.

What not to expect

Google's page does not say how long to keep redirects in place, and we do not give a number. A redirect protects an address that people and other sites still use. It does not guarantee your rankings stay the same through a move.

Where to go from here

If you are about to change URLs on a WordPress site, our WordPress SEO services include planning the redirects. Passieon is an independent agency and is not affiliated with Google.

Sources

Frequently asked questions

Which redirect should I use when I change a WordPress URL?

A permanent one, such as a 301 or 308. Google uses it as a signal that the new address should be the canonical page.

What is the difference between a 301 and a 302?

A 301 is permanent and Google shows the new address in results. A 302 is temporary and Google keeps the original page in results.

Is a JavaScript redirect fine?

Google calls it a last resort, because it may never see the redirect if rendering fails. Use a server-side redirect when you can.

Why does Google still show my old URL?

Google says the old name may linger in results after a redirect and will fade away without any action from you.

Should every old page redirect to the home page?

No. Send each old address to the new address for the same content, so visitors and Google reach the page they were looking for.

How long should I keep a redirect?

Google does not give a figure on its redirects page. Keep it while people or other sites may still use the old address.

Want this done for your site? See what our WordPress SEO services page covers, or read the client results.

Book a call with us

A 30-minute call in your working hours. Tell us what you sell and where, and we will tell you what we would do first and what it involves. Prefer email? Send your website through the form and the Passieon Team will reply by email.

Book a call

Message us

Message us

Ask anything about your site or where your inquiries are going. It goes straight to a person, not a bot. Leave an email and you get a reply.