A 301 redirect is a permanent redirect from one URL to another. It is used to tell web browsers and search engines that a page has been permanently moved to a new location. When a web browser requests the original URL, the web server sends back a "301 Moved Permanently" status code along with the new location of the page. The browser then calls up the new URL and the user is redirected to the new page.
301 redirects are often used in some cases:
- If the domain name or structure of a website has changed and the URLs have changed with it
- When a website is consolidated and multiple pages are redirected to a single page
When the content of a website has moved to a new domain and all URLs need to be redirected to the new domain.
- 301 redirects are also useful for SEO purposes, as they transfer "link juice" to the new page, i.e. the value passed on by links from other websites.
It is important to note that it may take some time for search engines to update their index with the new URLs. It is also important to use 301 redirects correctly to avoid a "redirect chain" where multiple redirects are used to go from one URL to another, which can slow down the browsing experience and potentially harm the website's SEO.