301 redirect
In one line
A 301 redirect is a permanent redirect. It tells browsers and search engines that an address has moved for good, and sends visitors to the new one automatically. It keeps old links working and passes on the signal that the move is permanent.
A forwarding address for the web
When you move house, you leave a forwarding address so the post still finds you. A 301 redirect does that for a web address. When someone opens the old address, the server answers with the code 301 and the new address, and the browser goes there at once. The visitor barely notices.
Permanent and temporary
The number says how long the move lasts. A 301 means permanent, so browsers and search engines can remember the new address and stop using the old one. A 302 means temporary, so they keep the old one in mind and come back to check. Use 301 when a page or domain has really moved, and 302 only for a short-term detour.
When you need one
- You changed the address of a page, and old links should still work.
- You moved to a new domain and want visitors to arrive at the right place.
- You want
wwwand the bare domain to lead to one version of your site. - You merged two pages and want one to stand in for the other.
Common mistakes
The most common mistake is a redirect loop, where A leads to B and B leads back to A, and the browser gives up. Another is a long chain, where an old address redirects several times before it lands. Each hop slows the visit, so point old addresses straight to the final one. Redirect to the closest matching page, not always the home page, so visitors find what they came for.
Redirects and your own domain
Choosing between www and the bare domain is a redirect decision: one of them sends visitors to the other. If you change your casa's primary address, read how to change your primary address to see what to expect, and keep the old link in your bio until you have tested the new one.
Questions people ask
What is the difference between a 301 and a 302 redirect?
A 301 says the move is permanent, so browsers and search engines can remember the new address. A 302 says it is temporary, so they keep checking the old one. Choose 301 when the old address will not return.
Does a redirect slow my site down?
Slightly, because the browser makes an extra request. One redirect is rarely noticeable, but chains of several add up. Point old addresses directly at the final address to keep things quick.