When to use a 301 redirect
- A page has moved to a new URL, or you have merged two pages into one.
- You move a whole website to a new domain.
- You switch from HTTP to HTTPS, or between the www and non-www versions of your address.
- You delete a page that has a close replacement.
301 redirects and SEO
Google treats a 301 as a strong signal that the new URL should be shown in search, and links pointing at the old URL keep helping the new one. To get the most from them:
- Redirect each old URL to the most relevant new page, not everything to the home page.
- Avoid chains (A to B to C) and loops: point old URLs straight to the final address.
- Update your own internal links and your sitemap to use the new URLs.
- Keep redirects in place for at least a year, and ideally for good.
For a temporary move, use a 302 redirect instead. For a page that is gone with no replacement, return a 404 or 410 status code.
Status codes compared
| Code | Meaning | Use |
|---|---|---|
| 301 | Moved permanently | The page has a new home for good |
| 302 | Found (temporary) | A short-term move. See 302 redirects |
| 308 | Permanent redirect | Like 301, but keeps the request method |
| 410 | Gone | Removed with no replacement. See 410 |
How to set up a 301 redirect
- WordPress: use a redirect plugin such as Redirection, or the redirect feature of an SEO plugin.
- Apache: a rule in the .htaccess file, for example
Redirect 301 /old-page/ https://www.example.com/new-page/. - Nginx: a rule in the server configuration, for example
return 301 https://www.example.com/new-page/;. - Hosting or CDN panels: many have a redirect setting.
How to check a redirect
Open the old URL in a browser, or use a crawler or an HTTP header checker to see the status code and the destination. After a migration, test a sample of old URLs and check Search Console for errors. For the general concept, see redirect.
301 redirect mistakes
- Redirecting everything to the home page.
- Redirect chains and loops.
- Using a 302 for a permanent move.
- Removing redirects too soon.
- Forgetting to update internal links.
301 redirect FAQs
Do 301 redirects lose link value?
Google has said that redirects do not lose PageRank, though a slow or messy chain hurts the experience.
How long should I keep a 301 redirect?
At least a year, and for as long as the old URL has links or traffic.