What Is a 301 Redirect?
A 301 redirect is the HTTP status code that says a URL has moved permanently to a new address. The server answers the request with a 301 and puts the new address in the Location header; the browser then takes the user to that address automatically 7 . RFC 9110 defines it this way: the target resource has been assigned a new permanent URI, and any future references should use it 6 .
Once you set up a 301, the old URL is gone; visitors and search engines alike go to the new address. Google treats a permanent redirect as a signal that the new address should be the canonical (preferred) one 1 .
How does a 301 redirect work? (The Location header and browser behavior)
- A visitor or Googlebot requests the old URL.
- Instead of the page body, the server returns a 301 status code and the new address in the Location header.
- The browser requests that address automatically and lands the user on the new page 7 .
- Googlebot follows the redirect; the indexing pipeline takes it as a signal that the redirect target should be canonical 1 .
Google's documentation on HTTP status codes sums up the difference in one sentence: a 301 is a strong signal that the redirect target should be processed 3 . In the same document, the word used for a 302 is a weak signal 3 . A visitor never notices the difference between the two; on the search side, the two codes do not say the same thing.
After the redirect is in place, Google keeps tracking both addresses: the source (old) URL and the target (new) URL 1 . Which one becomes canonical depends on signals such as whether the redirect is permanent or temporary; the other becomes an alternate name for the canonical address 1 .
When should you use a 301?
- When you change your URL structure: /product/12345 becomes /product/red-mug.
- When you move domains: every page on the old domain goes to its counterpart on the new one.
- When you switch from HTTP to HTTPS.
- When you pick either the www or the non-www version as your single address.
- When you merge two similar pages into one.
- When you point a discontinued product page to its replacement or to its parent category.
Google recommends a server-side permanent redirect wherever possible when you need to change a URL that appears in search results 1 . If you have no access to the server, an instant (zero-delay) meta refresh counts as a permanent redirect 1 . A JavaScript redirect is the last resort: if rendering fails, Google may never see the redirect at all 1 .
There is one sentence we deliberately don't write. Google's documentation nowhere says that a 301 passes a page's authority one to one. What is documented is narrower and clearer: a permanent redirect is a strong signal that the target should be processed 3 . Decisions rest on that statement, not on a rumored transfer rate.
The Difference Between 301, 302, 307 and 308
301 and 308 are permanent, 302 and 307 are temporary. The second difference is the HTTP method: with 301 and 302 the browser may turn a POST request into a GET, with 307 and 308 it may not 6 . Google defines 301 and 308 as permanent moves 1 . With a permanent redirect the new target shows in search results; with a temporary one the source page does 1 .
301, 302, 307 and 308 compared
When to use a 308 (forms and checkout flows that send POST requests)
If a form submission or a payment step sits behind the redirect, use a 308. RFC 9110 spells out why: for historical reasons, a user agent may change the request method from POST to GET after a 301; if that behavior is undesired, a 308 can be used 6 .
MDN repeats the warning from the browser side: use 308 to prevent the request from being altered, because changing the method after a 308 response is prohibited 7 . A 307 is its temporary counterpart; it forbids changing the method on an automatic redirect 6 . One caveat: 308 is much newer than its sibling codes (June 2014) and may not be recognized by every client 6 .
To Google 307 = 302 and 308 = 301 — but they don't mean the same thing
In Google's HTTP status code documentation, a 307 is equivalent to a 302 and a 308 to a 301 3 . That does not mean it doesn't matter which one you write. The same document warns that while Google processes these codes the same way, they are semantically different 3 .
The reason is again in Google's own words: use the status code that fits the redirect so other clients, such as e-readers and other search engines, can benefit from it too 3 . Writing the right code matters not only for Google but for every client that visits the site.
Temporary codes have legitimate uses too: a page taken down for maintenance, a category that reopens after a campaign, an off-season collection. The test is a single question — will the address come back? Use a permanent code only when you are sure the redirect will not be reversed 1 .
The practical rule fits in four lines. Permanent move, no form behind it: 301. Permanent with a POST flow: 308. Temporary with a POST flow: 307. Temporary and the request body doesn't matter: 302. Which of the four you write decides whether the old or the new address stays in search results 1 .
How to Set Up a 301 Redirect on the Server (.htaccess, Nginx, PHP)
A server-side 301 is the most reliable form of redirect: the rule lives in the server configuration and the client goes to the new address without ever downloading the page. The examples below work as written for Apache, Nginx and PHP; just adjust the paths to your own site.
Apache (.htaccess): Redirect and RewriteRule
Apache gives you two options. mod_alias's Redirect directive does simple one-line mapping; mod_rewrite's RewriteRule lets you write patterns and conditions. Inside .htaccess, the RewriteRule pattern takes no leading slash, because Apache evaluates the path relative to the directory.
- Single page, mod_alias: Redirect permanent "/old-page" "https://example.com/new-page"
- Single page, mod_rewrite: after the RewriteEngine on line, RewriteRule "^old-page$" "/new-page" [R=301,L]
- Whole folder: Redirect permanent "/old-folder" "https://example.com/new-folder"
- Permanently removed page: Redirect gone "/removed-page" — no target URL is written
The most common mistake: Apache's Redirect directive defaults to 302
Write Redirect "/old" "/new" and you get a 302, not a 301. The Apache documentation is clear: if no status argument is given, the redirect is temporary, i.e. HTTP 302 10 . A permanent redirect requires the permanent argument; permanent returns a 301 10 .
The cost of this mistake shows up late. Visitors notice nothing; the browser opens the right page. But Google treats the redirect as a weak signal 3 and the source page stays in search results 1 . You think you have moved the page, yet the old URL stays in the index. Always verify the status code after writing the rule.
Nginx: return 301 and rewrite permanent
Nginx has no .htaccess; the rule goes into the server block and the configuration is reloaded. Since version 0.8.42, the return directive accepts a redirect URL for the codes 301, 302, 303, 307 and 308 9 .
- Single page: location = /old-page { return 301 https://example.com/new-page; }
- Whole domain: server { server_name old.com www.old.com; return 301 https://new.com$request_uri; }
- Pattern rule: rewrite ^/old-folder/(.*)$ /new-folder/$1 permanent;
The flag difference in the rewrite directive is the Nginx version of the Apache trap: permanent returns a 301, redirect returns a 302 9 . With return you write the code yourself, so the confusion never arises; return is preferred for simple redirects.
PHP: a 301 with header()
- header('HTTP/1.1 301 Moved Permanently');
- header('Location: https://www.example.com/new-address');
- exit();
All three lines are needed: the status code, the target address and the exit call that stops the script. If even a single character has been output before the header calls, the headers cannot be sent and the redirect fails. A PHP redirect only covers requests that hit that file; site-wide rules belong in the server configuration.
www ↔ non-www and HTTP → HTTPS redirects
- Apache, non-www to www: RewriteEngine on · RewriteCond %{HTTP_HOST} ^example\.com$ [NC] · RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
- Apache, HTTP to HTTPS: RewriteEngine on · RewriteCond %{HTTPS} off · RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
- Nginx, both at once: server { listen 80; server_name example.com www.example.com; return 301 https://www.example.com$request_uri; }
If you write these two rules separately in Apache, a non-www HTTP address goes first to HTTPS, then to www: a two-hop chain. Combine them into a single rule as in the Nginx example, or set up the Apache rule so it fixes the protocol and the host name at the same time.
301 Redirects in a CMS: WordPress and Webflow
If you can't reach the server configuration, you set up the redirect from your content management system. The outcome should not change: the response must be a 301 and the target must be one hop away.
301 redirects in WordPress
WordPress offers three routes: a plugin such as Redirection or Yoast SEO, the .htaccess file on the server, and the redirect WordPress creates itself when you change a post's permalink. Plugin rules live in the database and run PHP on every request; once hundreds of rules pile up, moving the same rules into .htaccess is faster.
301s in Webflow: single rules, bulk CSV upload and wildcards
In Webflow, 301s are added under Site settings one at a time or in bulk with a CSV file 8 . Write source URLs as relative paths, without the domain 8 . Webflow has no hard cap; 1,000 rules is the recommended best practice 8 .
- Wildcard: old path /old-folder/(.*), target /new-folder/%1 — the part in parentheses is captured and carried to the target with %1 8 .
- Webflow wildcard rules don't support regex or rule ordering; you can't exclude a page from a rule 8 .
- To redirect a live static page, you first have to delete it, set it to draft or change its slug 8 .
- Rules are relative to the root domain; localized slugs such as /es/old-url need their own rules 8 .
Check both columns before uploading the CSV. If a domain is left in the source column, the rule is not in the format Webflow expects 8 ; if the target column contains a page that isn't published, you send visitors to a 404. In migrations, preparing this file in advance and uploading it in one go removes manual entry errors.
In migrations under our Webflow development service, we prepare the map before go-live and verify it by sampling after upload. Once the rule count reaches three digits, checking one by one is no longer practical; verification has to happen on the command line.
How Long Should a 301 Redirect Stay in Place?
Google recommends keeping redirects in place for as long as possible — generally at least one year 2 . The reason is in the same sentence: that time is needed for Google to transfer all signals to the new URLs. Recrawling and reassigning links from other sites happen within that window 2 .
The recommendation on the user side is even clearer: consider keeping redirects indefinitely. Redirects do slow users down, though, so update your own links and high-volume links from other sites to the new URLs 2 . The rule stays live, but most traffic no longer touches it.
Use a permanent code only when you are sure the redirect will not be reversed 1 . A campaign page that reopens in three months gets a 302, not a 301. Setting up a 301 and then reversing it leaves the old and new addresses living side by side in the index for a while; which one becomes canonical depends on signals 1 .
How long should a 301 redirect stay in place?
When moving domains: Search Console Change of Address and 180 days
The Change of Address tool does not replace redirects. Google's own guidance says to use the tool after you have moved and redirected the site 5 . Once you run it, processing continues for 180 days from the day you start the move in Search Console 5 .
Google does not delete the old site from the index. Old URLs with no counterpart on the new site can keep appearing in search results as long as they are reachable 5 . If you changed domains, it is normal for old URLs to show for a while even after the new addresses are indexed 1 .
Be careful when putting numbers on timing. Google gives no figure for how many days a redirect takes to take effect. The only scale it offers is that on a medium-sized site, moving most pages in the index can take a few weeks 2 . Day counts beyond that are guesses. Build the plan on the two sourced numbers: 180 days and one year 5 2 .
Does a 301 Redirect Lose SEO Value? Where Did the "15% Loss" Come From?
Google's current documentation contains not a single statement that a 301 redirect loses PageRank. This is an observation, not a claim: the Redirects and Google Search document (updated 14 April 2026) and the HTTP status codes document (updated 4 February 2026) were read end to end; the words PageRank, dilution and loss do not appear.
Tracing the "15%": the damping factor in the 1998 PageRank paper
The only verifiable trace of the circulating 15% figure leads to the 1998 PageRank paper. Sergey Brin and Lawrence Page define a damping factor, written d, in the PageRank formula and say they usually set it to 0.85 11 . The remainder is 0.15, or 15%.
The factor has nothing to do with redirects. d represents the probability that a random surfer follows a link at the next step, and it applies to the entire formula 11 . The 1998 paper never mentions 301 redirects. The number was lifted out of context and pinned onto redirects.
Statements made on Google's behalf, with dates
There are two statements made on Google's behalf, and both are reported through the press. According to a Search Engine Land article dated 27 July 2016, Google's Gary Illyes said 30x redirects no longer lose PageRank 12 .
In a Search Engine Journal article dated 29 October 2018, John Mueller explained that PageRank can pass through 301 and 302 redirects and that the mechanism is canonical selection via those redirects 13 .
We could not find any official Google statement from after 2023. So we don't write "Google says a 301 loses no value" on behalf of today's Google. Both statements we have come with a known date and publisher; we cite each with its date and leave it there.
The only thing verifiable today is the signal distinction in Google's current documentation: a 301 is a strong signal, a 302 a weak one 3 . Redirect decisions are made on that distinction, not on an estimated loss percentage. If an agency quotes you a percentage lost per redirect, ask for the primary source of that number.
Redirect Chains and Redirect Loops
A redirect chain is when a URL redirects to another redirect, which redirects to yet another. Googlebot follows up to 10 redirect hops by default 3 . Google still tells you to keep chains short: ideally no more than 3 hops, and in any case under 5 2 .
How many hops are acceptable in a redirect chain?
How many hops are acceptable?
The right number is one. Point the old URL straight to the final target. Google ignores the content it receives from the redirecting URL; what gets processed is the content of the final target URL 3 . The hops in between gain you nothing, and each adds delay for the user. Chains are rarely built on purpose; they pile up as new rules are written on top of old ones.
John Mueller described the real problem with chains in 2018: the issue is not link value lost along the chain but usability and crawlability 13 . On this page we don't quote a "10% lost per hop" kind of figure; no such number has a verifiable primary source.
Why do redirect loops happen?
A loop is two rules pointing at each other; the client sends the request over and over and the page never opens. RFC 9110 says a client should detect and intervene in cyclical redirections 6 . An earlier version of the specification recommended a maximum of five redirects 6 .
- www and HTTPS rules triggering each other.
- The CMS's own redirect clashing with a server rule.
- Adding a new rule without deleting the old one: address A goes to B, and B goes to A.
The fix has three steps: cut the chain down to one hop, point your internal linking at the final URL rather than an intermediate address 8 , and remove redirected URLs from the sitemap. In our own site's 148-rule map there are zero chains and zero loops 14 ; that result comes from how the rules are organized, not from how many there are.
301, Canonical or 404/410? A Decision Table
A 301 removes the duplicate page; a canonical URL tag tells search engines which page is preferred while both stay live. Google describes a permanent redirect as the method to use when you want to get rid of existing duplicate pages 4 . So a 301 is not an alternative to canonicalization; it is the strongest way to set a canonical 1 .
SituationRight toolWhyOld page goes away and has an exact counterpart301 (308 if there is a POST flow)The duplicate disappears and the target receives the canonical signalBoth pages stay live with very similar contentrel=canonicalThe user isn't redirected; the search engine is told your preferenceContent is permanently gone with no counterpart410 (or 404)A 301 to a target with no real counterpart produces a soft 404Page is temporarily down and will return302 (307 if there is a POST flow)The source page stays in search results
Permanent removal is a single line in Apache too: Redirect gone "/removed-page". The gone argument returns a 410, and in that case no URL argument is written 10 . All four options directly affect the search engine index decision; which one you write decides whether the old address stays in the results 1 .
The input to this table is usually a duplicate content problem. If you publish the same product at three different URLs, first decide which one survives: canonical if both stay live, 301 if one goes away. Writing rules before deciding leads to a second round of fixes; and when the removed page reopens a few months later, the same rule causes trouble in the opposite direction.
Redirecting old pages to the homepage: the soft 404 risk
Google says it plainly: don't redirect many old URLs to a single irrelevant target such as the new site's homepage 2 . It confuses users and may be treated as a soft 404 error 2 . It is also the most common mistake after a bulk deletion.
The exception is documented: if you have consolidated content that used to live on several pages into a single new page, you can redirect the old URLs to that consolidated page 2 . The difference is not intent but equivalence: does the target page actually replace the old content or not?
John Mueller drew the same line in 2018: a 301 for 404s only makes sense if you have URLs that are true one-to-one replacements; otherwise Google will most likely see it as a soft 404 and treat it as a 404 13 . Returning a 410 for a page with no counterpart is a more honest fix than redirecting it 10 .
How to Test a 301 Redirect (curl and Search Console)
Test redirects on the command line, not in the browser. The browser takes you to the target but doesn't show how many hops are in between. One command is enough: curl -sI https://example.com/old-page
- The first line is the status code: if you see HTTP/2 301, the rule is permanent.
- The location line gives the target; that address should be the final page, not another redirect.
- If there is a second hop, run the same command on the address in the location output and count the chain.
An example from our own site: curl -sI https://www.roicool.com/en/glossary/a-b-test returns HTTP/2 301 and location: /en/glossary; the target is reached in one hop. Normalization from the non-www to the www version of the domain and from HTTP to HTTPS also completes in a single hop 15 .
The full map consists of 148 rules and 39 distinct target URLs, with zero chains and zero loops. The two largest consolidations are 61 rules pointing to /en/glossary and 36 rules pointing to the /sozluk hub 14 . This is a live example of the exception Google documents for redirecting consolidated content to a single new page — those terms fall under the exception because we merged their content into the hub page; mass-redirecting pages whose content you have not consolidated to one target is not the same thing 2 .
Don't use Search Console's URL Inspection tool for this. Google's own documentation says that while Googlebot follows 10 redirect hops when crawling general web content, Google Inspection Tools do not follow redirects 3 . The tool won't show you what lies beyond the redirect.
- Does every rule finish in one hop?
- Do internal links go to the final URL rather than an intermediate address?
- Are any redirected URLs left in the sitemap?
- Does the rule that should be permanent actually return a 301?
Where does roicool.com's 148-rule 301 map point?
301 redirect setup flow
Building a redirect map, mapping old and new addresses before a migration and verifying every rule after it are part of our technical SEO service. We built our own map the same way and verify it with the same command 15 .
Frequently asked questions
How long should a 301 redirect stay in place?
Google recommends keeping redirects in place for as long as possible, generally at least one year 2 . That time is needed for Google to transfer all signals to the new URLs, recrawl and reassign links from other sites 2 . If you moved domains, Search Console's Change of Address processing runs for 180 days from the day you start the move 5 . The recommendation on the user side is even clearer: consider keeping redirects indefinitely, but update your own links to the new addresses 2 .
What is the difference between a 301 and a 302 redirect?
A 301 is a permanent move, a 302 a temporary one. Google treats a 301 as a strong signal and a 302 as a weak signal that the redirect target should be processed 3 . The difference shows in search results: with a permanent redirect the new target is shown, with a temporary one the source page 1 . The second difference is not the HTTP method — with both 301 and 302 the browser may turn a POST request into a GET; if you want to keep the method, use 308 for permanent and 307 for temporary moves 6 . Write a 301 if the address won't come back, a 302 if it will 1 .
When should you use a 307 or 308 redirect?
307 and 308 are used when you don't want the browser to turn a POST request into a GET; 307 is temporary, 308 permanent 6 . RFC 9110 says a user agent may change the method from POST to GET after a 301, and a 308 can be used if that is undesired 6 . That's the right choice for flows that include a form submission or a payment step. Google treats a 307 as equivalent to a 302 and a 308 to a 301 3 ; still, because 308 was added in June 2014, it may not be recognized by every client 6 .
Does a 301 redirect lose SEO value (PageRank)?
Google's current documentation contains no statement that a 301 loses PageRank. The only verifiable trace of the circulating 15% figure is the 0.85 damping factor in the 1998 PageRank paper, and that factor has nothing to do with redirects 11 . There are two statements made on Google's behalf, reported through the press: Gary Illyes said in 2016 that 30x redirects don't lose PageRank 12 ; John Mueller explained in 2018 that PageRank passes through 301 and 302 redirects 13 . We found no official Google statement from after 2023.
What is the difference between a 301 redirect and a canonical tag?
A 301 removes the duplicate page; a canonical tag tells search engines which page is preferred while both stay live. Google describes a permanent redirect as the method to use when you want to get rid of existing duplicate pages 4 . A permanent redirect is also a signal that the target should be canonical 1 ; so a 301 is not a rival to the canonical but the strongest way to set one. Use a 301 if the user should be redirected, a canonical if both pages will stay live.
How do you check a 301 redirect?
Check it with the curl -sI command by reading the status code and the location header; if the response is a 301 and the target is one hop away, the rule is correct 15 . If the address in the location line leads to another redirect, you have a chain. Googlebot follows up to 10 hops by default 3 , but Google says a chain should ideally stay at 3 hops or fewer and under 5 2 . Search Console's URL Inspection tool does not follow redirects 3 .
Last updated:








