HTTP Status Codes
What is a 301 redirect?
A 301 redirect is a permanent HTTP status code that tells browsers and search engines a URL has moved to a new location, permanently. When someone visits the old URL, they are automatically sent to the new one without any action required on their part.
The “301” refers to the HTTP status code returned by the server. It sits in the 3xx redirect class of status codes, which all deal with directing requests from one location to another.
How a 301 redirect works
When a browser or web crawler requests a URL that has a 301 redirect in place, the server responds with the 301 status code and a Location header pointing to the new URL. The browser then automatically follows that location and loads the destination page.
The whole process is invisible to the visitor, they never see the old URL, they just land on the new one instantly.
From a technical standpoint, 301 redirects are handled at the server level, making them server-side redirects. This is different from a JavaScript redirect or a meta refresh redirect, which are processed by the browser after the page has already loaded.
301 redirects and SEO
The most important property of a 301 redirect for SEO is that it passes link juice, also called SEO equity, from the old URL to the new one. This means any backlinks pointing to your old URL continue to benefit your new URL after the redirect is in place.
Google treats a 301 as a strong signal that the new URL is the canonical URL and should be indexed in place of the old one. Over time, Google will drop the old URL from its index and replace it entirely with the new destination.
Without a 301 redirect in place, a moved page returns a 404 error, which means all the SEO value built up on that URL is lost and visitors hit a dead end.
When to use a 301 redirect
A 301 is the right choice any time a URL is moving permanently and you do not expect the old location to ever be used again. The most common use cases are:
Domain migration: moving an entire site from one domain to another, for example during domain rebranding or a company merger. Every old URL should have a 301 pointing to its equivalent new URL.
HTTP to HTTPS: redirecting all HTTP traffic to HTTPS is one of the most common 301 use cases. This ensures visitors always land on the secure version of your site and avoids mixed content warnings.
www to non-www (or vice versa): if your site is accessible at both
www.example.comandexample.com, you should pick one and 301 redirect the other to it. This prevents duplicate content and consolidates your crawl budget.Restructuring URLs: if you change the URL structure of your site, such as removing dates from blog post URLs or changing a URL slug, use 301s to map old URLs to new ones.
Consolidating pages: if you merge two pages into one, 301 redirect the old URLs to the new combined page to preserve all incoming link equity.
301 vs other redirect types
It is worth understanding how a 301 compares to the other redirect status codes:
A 302 redirect is temporary. Use it when a page has moved for a short time and will return to the original URL. Search engines keep the original URL indexed and do not pass full SEO equity to the destination.
A 307 redirect is the HTTP/1.1 equivalent of a 302 — also temporary, but stricter about preserving the request method.
A 308 redirect is the permanent equivalent of a 307. Like a 301 it signals a permanent move, but it strictly preserves the HTTP request method (POST stays POST, rather than being changed to GET). Most websites do not need a 308 — 301 is the standard choice for permanent redirects.
If you are unsure which to use, the rule is simple: permanent move = 301, temporary move = 302.
Common mistakes with 301 redirects
Redirect chains: a redirect chain happens when URL A redirects to URL B, which redirects to URL C. Each hop adds latency and dilutes SEO equity. Always redirect directly to the final destination.
Redirect loops: a redirect loop occurs when two or more URLs redirect to each other in a circle, making the page inaccessible. Browsers will show an
ERR_TOO_MANY_REDIRECTSerror.Redirecting everything to the homepage: a common mistake during site migrations is pointing every old URL to the homepage with a 301 rather than mapping each page to its equivalent new URL. Google calls these “soft 404s” and they do not pass SEO equity effectively.
Using 301 when you mean 302: if you redirect a page temporarily for a campaign or A/B test using a 301, browsers and search engines will cache it permanently. Always use a temporary redirect for anything that is not a permanent change.
How to set up a 301 redirect
There are several ways to implement a 301 redirect depending on your setup:
On Apache servers, you can add rules to your .htaccess file. On Nginx, rules go in the server config block. Most website platforms and CMS tools have built-in redirect managers. And with a dedicated redirect management tool like Redirect Supply, you can manage 301s for any domain from a single dashboard without touching server config files.