A 301 redirect is an HTTP response that tells browsers and search engines a page has moved permanently to a new address. The server answers the old URL with status 301 and a Location header naming the new URL, and the visitor is sent there automatically. Google treats it as a strong sign that the new URL should be the one it indexes.
Why it matters
Pages move for ordinary reasons: you change a URL, merge two pages, switch to HTTPS or move to a new domain. Without a redirect, old links and bookmarks lead to an error page and the value those links carried is lost. A 301 redirect keeps visitors on track and tells search engines where the content lives now.
How to set one up
- Decide the exact old URL and the exact new URL. Send each old page to its closest equivalent, not everything to the home page.
- Add the rule where your site is served. In Apache
.htaccess:
Redirect 301 /old-page /new-page
- In nginx:
location = /old-page {
return 301 /new-page;
}
- In a CMS, use its redirect manager or a redirect plugin and choose "301 Moved Permanently".
- Check the result with curl:
curl -sI https://example.com/old-page
Look for a first line such as HTTP/2 301 and a location header with the new address.
6. Open the new URL in a browser and confirm it returns a normal 200 page, not another redirect.
7. Update internal links, the sitemap and canonical tags so they use the new URL directly.
Common mistakes
- Using a 301 for something that is only temporary, such as a short maintenance page. Use a 302 or 307 for that.
- Redirecting many different old pages to one unrelated page, which search engines may treat like a soft 404.
- Building chains where A goes to B and B goes to C.
- Leaving internal links pointing at the old URL after the redirect exists.
- Removing the redirect after a few weeks, while old links are still in use.
Frequently asked questions
Does a 301 redirect pass ranking signals?
Google follows 301 redirects and uses them as a strong hint for choosing the canonical URL. Google's documentation describes redirects as a way to consolidate signals when a page moves. It does not promise that rankings stay identical.
How long should I keep a 301 redirect?
Keep it for as long as practical. Google's site move guidance is to leave redirects in place for a long time, and a year or more is a sensible target if old links are still in use.
What is the difference between 301 and 308?
Both mean permanent. A 308 additionally requires the browser to repeat the original request method, such as POST. For ordinary page moves, 301 is the usual and well-supported choice.
Related guides
- 301 vs 302 redirects for SEO
- Redirect chains and loops
- Nginx and Apache redirects for SEO
- Website migration SEO checklist
Want to see how your own pages respond? Try the free website sample.