A 301 redirect permanently sends users and search engines from one URL to another. It is the right tool when a page moves, two pages merge or a whole domain changes, and it is one of the most important skills in technical SEO because it keeps the rankings and links an old page earned.
When to use a 301
- You change a page’s URL or slug.
- You merge two similar articles into one.
- You delete a product and have a close replacement.
- You switch from HTTP to HTTPS, or from non-www to www.
- You move to a new domain.
301 vs 302 vs canonical
A 302 is for temporary moves, such as a seasonal page. A canonical tag keeps both URLs live but nominates one for search. A 301 says the old URL is retired for good. Our guide to HTTP status codes lists the other redirect types.
Do 301s lose link equity?
Google has confirmed that 301 and other server-side redirects pass PageRank without loss. The risk comes from irrelevant redirects: pointing an old article about running shoes at your homepage may be treated as a soft 404, so the signals are lost.
How to set up 301 redirects
WordPress
Rank Math and Yoast Premium include redirect managers, and the free Redirection plugin works well. WordPress also auto-redirects when you change a post’s slug, but it is safer to add the redirect yourself.
Apache (.htaccess)
Redirect 301 /old-page/ https://www.example.com/new-page/
Nginx
location = /old-page/ { return 301 https://www.example.com/new-page/; }Shopify, Wix and Squarespace
Each has a URL redirects section in its settings.
Avoid redirect chains and loops
A chain is A to B to C. A loop is A to B to A. Chains slow pages, waste crawl budget and can stop Googlebot following after a few hops. Point every old URL straight to the final destination and update internal links to the final URL so they never touch a redirect.
Redirects during a site migration
- Crawl the old site and export every URL with traffic or backlinks.
- Map each one to its closest new equivalent.
- Implement redirects before launch and test a sample.
- Update the XML sitemap and internal links.
- Keep redirects in place for at least a year, ideally forever.
- Monitor Search Console for spikes in 404s.
Frequently asked questions
How long do 301s take to work?
Google needs to recrawl the old URL. Important pages update within days; obscure ones can take weeks.
Can I remove old redirects?
Only if the old URLs have no links or traffic. When in doubt, keep them.
Related terms
See duplicate content, URL structure and the SEO encyclopedia.
