301 redirect in one sentence
A 301 redirect says: “this page now lives permanently at a different address”.
When someone opens the old address, the server answers with code 301 and the new address, and the browser goes there straight away. Visitors usually don't even notice. Google treats a 301 as a signal to show the new address in results and transfer the old page's ranking to it.
When you need one
- A site migration, e.g. from WordPress to Astro, if even some URLs change.
- A domain change, e.g. after a rebrand.
- A new URL structure, e.g. from /?p=123 to /services/websites/, or dropping /blog/ from post URLs.
- Removing or merging pages: the old address points to the closest replacement.
- Moving from http to https and settling on either www or non-www.
301 or 302
A 302 redirect means a temporary change, e.g. during a promotion or maintenance. Google keeps the old address in its results. For permanent changes, always use a 301.
A common mistake is plugins and hosts that set 302 by default. The site works, visitors land in the right place, and for months Google doesn't move the rankings to the new addresses.
The most common migration mistakes
- Redirecting every old URL to the homepage. Google treats this as the pages being removed, so the rankings are lost anyway.
- Redirect chains: A → B → C. Each hop slows the site down and weakens the signal. An old address should go straight to its final destination.
- Missed addresses: images, PDFs, categories, tags and old campaigns that links still point to.
- Removing redirects after a few weeks. I keep them permanently, because links from other sites don't go away.
That's why before every migration I list all of the old site's addresses, from the sitemap, Search Console and link analysis tools, and decide a new home for each one.
How to set up a 301 redirect
- In WordPress: with a plugin such as Redirection, or in your SEO plugin's settings. Handy for a few addresses.
- On an Apache server: in the .htaccess file, e.g.
Redirect 301 /old-page/ /new-page/. Faster and independent of WordPress. - On a static site: in the server's or host's configuration file, e.g. .htaccess or _redirects, generated together with the site's build.
After launch I check every redirect automatically: that it returns a 301, goes straight to its target, and that the target answers with a 200.
FAQ
Frequently asked questions
Does a 301 redirect lower rankings?
A correct 301 redirect passes the old address's ranking to the new one. Some fluctuation in the weeks after a migration is normal, but with a well-prepared redirect map rankings return to their previous level.
How long should I keep redirects?
Ideally forever. Google usually transfers signals within a few months, but links from other sites, bookmarks and old printed materials will point to the old addresses for years.
How do I check that a redirect works?
The simplest way is an online HTTP status checker, or the Network tab in your browser's developer tools. The old address should return a 301 and point straight to the new one, which returns a 200.