SEOLyzerPro
Use 47 free online tools: meta tag and robots.txt generators, image and text tools, JSON converters, calculators and unit converters. No signup needed
301 vs 302 Redirects: Which One to Use
Plus how to find and fix redirect chains and loops
301 vs 302 Redirects: Which to Use and How to Fix Chains
By : Safdar Waraich | Last updated: 31 October 2026
Sooner or later, every website owner moves a page. You change a slug, switch from http to https, merge two articles, or move to a new domain. When that happens, the old address does not simply vanish. People have bookmarked it, other sites link to it, and search engines have stored it. If visitors who use the old address land on an error page, you lose them, and you may lose some of the trust that page had built up.
A redirect solves this problem. It sends visitors and search engines from the old address to the new one. But there is more than one kind of redirect, and choosing the wrong one, or stacking several together, can cause quiet damage. In this guide you will learn what the main redirect types mean, when to use a 301 and when a 302, what redirect chains and loops are, and how to find and fix them.
What is a redirect?
A redirect is an instruction from your server that says: “The page you asked for is somewhere else, go there.” When a browser asks for /old-page, the server answers with a status code in the 3xx range and the new address. The browser then requests the new address automatically. The visitor usually notices nothing except that the address bar changes.
A search engine crawler follows the same steps. The status code also tells it something important: whether the move is permanent or temporary. That one detail changes how the search engine treats the old and the new address.
The four redirect codes you will meet
| Code | Name | Meaning | Typical use |
|---|---|---|---|
| 301 | Moved Permanently | The page has a new permanent address | Changed slug, https switch, new domain, merged pages |
| 302 | Found | The page is temporarily somewhere else | Short promotion, maintenance, A/B test |
| 307 | Temporary Redirect | Like 302, but the request method must stay the same | Temporary moves where form data (POST) must be preserved |
| 308 | Permanent Redirect | Like 301, but the request method must stay the same | Permanent moves in APIs and applications |
For everyday website work, you can group them in two families: 301 and 308 are permanent, and 302 and 307 are temporary. The difference between 301 and 308 (or 302 and 307) matters mostly to developers who handle form submissions and API requests, because it affects whether a POST request can change into a GET. For ordinary pages, 301 and 302 are what you will use.
301 vs 302: the real difference
A 301 says: “This move is permanent. Please replace the old address with the new one.” Search engines then treat the new address as the main version, move their attention to it, and over time drop the old address from the results. Browsers may also remember a 301 and skip the old address the next time.
A 302 says: “This move is temporary. The old address will come back.” Search engines are more likely to keep the old address as the main version, because you told them that the change will not last.
Google has said that it uses a permanent redirect as a strong signal that the new address should be the canonical (main) one, and a temporary redirect as a weak signal. In practice, Google can also work out what you really meant. If a 302 stays in place for a long time, Google may start to treat it like a permanent redirect. But you should not depend on that. Say clearly what you mean, and the search engine does not have to guess.
When to use a 301
Use a 301 whenever the old address will not return:
- You changed a page’s slug or moved it to another folder.
- You switched your site from http to https.
- You chose one version of your domain (with or without www) and want the other to point to it.
- You merged two similar articles into one stronger article.
- You moved to a new domain.
- You deleted a page and have a close replacement that covers the same topic.
When to use a 302
Use a 302 only when the original address really will come back:
- A product is out of stock for a short time, and you send visitors to a category page.
- You run a short promotion or event page, and the normal page returns afterwards.
- You test a new page design with part of your visitors (an A/B test).
- A page is down for maintenance and you show a temporary page.
If you are unsure, ask yourself one question: “Will the old address come back?” If the answer is no, use a 301.
A very common mistake: a 302 where you meant a 301
Many redirect plugins, frameworks and hand-written server rules use 302 as the default. The redirect works for visitors, so nobody notices the problem. But the search engine reads a temporary move, and it may keep the old address in its index for longer than you want, or give the new address less attention than you expected.
How to avoid it: never trust the default. After you create a redirect, test it with the Redirect Checker or the HTTP Status Code Checker and read the status code. It should say 301 for a permanent move.
What is a redirect chain?
A redirect chain happens when one address redirects to a second address, which redirects to a third, and so on. Here is a realistic example. You moved your site to https and to the www version, and later you changed a slug:
http://example.com/old-pageredirects (301) tohttps://example.com/old-page, which redirects (301) tohttps://www.example.com/old-page, which redirects (301) tohttps://www.example.com/new-page, which finally loads (200).
Every step is a separate request. The visitor waits through three redirects before the page even starts to load. On a slow mobile connection, that delay is easy to feel.
Why chains are a problem
- They slow the page down. Each hop adds a round trip between the browser and the server.
- They waste crawling time. Search engines have a limited amount of time for each site. Following extra hops uses that time on pages that are not your content.
- They can stop being followed. Google’s crawlers follow a limited number of hops in a chain, documented as up to 10. Beyond that, the final page may not be reached. Even long before that limit, a chain is a bad idea. (Check Google’s current documentation for the exact figure.)
- They are fragile. One change in the middle can break the whole path.
- They hide problems. An old redirect can quietly point to a page that was later deleted.
The goal is simple: every old address should reach its final destination in one hop.
What is a redirect loop?
A loop happens when addresses send visitors around in a circle: A redirects to B, and B redirects back to A. The browser gives up and shows an error such as “too many redirects” (often named ERR_TOO_MANY_REDIRECTS). The page becomes unreachable for visitors and for search engines.
Typical causes:
- A rule that adds www, and another rule that removes it.
- Two rules that both force https, one in the server and one in a plugin or a CDN.
- A redirect that points to the address it is already on, or a rule with a pattern that is too wide.
- A cached redirect in your browser that no longer matches the current rules. Test in a private window to rule this out.
The three most common redirect situations
1. Moving from http to https. Every http address should redirect with a 301 to the same path on https. Combine this with your preferred www choice, so that all four versions of your home address (http or https, with or without www) end at one single address in one hop.
2. Choosing www or non-www. Pick one version. Redirect the other to it with a 301. Use that same version in your sitemap, canonical tags and internal links.
3. Changing a slug. Redirect the old address to the new one with a 301. Update your internal links so that they point directly at the new address, and update your sitemap. The redirect should be a safety net for old links, not the way your own pages connect to each other.
How to find redirect problems
Check single addresses. Enter an address in the Redirect Checker. It lists every hop with its status code, so you can see the full path at a glance. Look for more than one hop, for a 302 where you expected a 301, and for a final status that is not 200. The HTTP Status Code Checker is useful when you only need to see the status of one address.
Test your four home-page versions. Check http://example.com, http://www.example.com, https://example.com and https://www.example.com. Each should end at your preferred address in one step.
Use Google Search Console. The page indexing report can show pages with redirect problems. It helps you find issues across the whole site, while single-address tools help you diagnose each one.
Crawl your own site. A crawler tool (some are free for small sites) visits your links and reports every redirect it meets. Internal links that point to redirected addresses are good candidates for a clean-up.
How to fix a redirect chain
- Write down the full path. Use the Redirect Checker to list every hop, from the first address to the final one.
- Decide on the final destination. It should be the correct page, with a 200 status, at your preferred address.
- Change the first redirect so that it points to the final address. Instead of A to B to C, you want A to C and B to C.
- Remove or update the middle rules. If the middle rule is no longer needed, delete it. If it is still needed for other addresses, keep it, but make sure nothing points through it.
- Update your internal links. Replace links to old addresses with links to the final address, so that your own site does not rely on redirects.
- Retest. Check each old address again, and confirm a single 301 followed by a 200.
How to set up a 301 redirect
The method depends on your server and your system.
On an Apache server (.htaccess). A simple redirect for one page looks like this:
Redirect 301 /old-page https://www.example.com/new-page
To force https on every page, a common rule is:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
You can generate rules like these with the htaccess Redirect Generator. Always make a backup of your .htaccess file before you change it, because a single typing mistake can bring the whole site down with a 500 error. If that happens, restore the backup straight away.
On other servers. Nginx and other servers do not read .htaccess. They have their own configuration, so ask your host or check the documentation for your server.
In a content management system or admin panel. Many systems have a redirect or URL manager where you enter the old and new address and choose the code. Check which status code it uses by default, then test the result.
Redirects, speed and rankings
A single, correct 301 is a normal part of running a website. Google has said that it can pass signals from the old address to the new one through a redirect, which is why a clean move does not have to mean starting from zero. The word “clean” is important, though. Rankings can still change after a move, because the new address has to be crawled and processed again, and the redirect needs to point to a page that is truly relevant. Redirecting a deleted article to your home page, or to an unrelated page, gives visitors something they did not ask for, and search engines may treat it as a “soft 404”.
Keep your redirects for a long time. If you move a whole site to a new domain, Google recommends keeping the redirects in place for at least a year. For single pages, keep them as long as the old address still receives visits or links.
Other ways to redirect (and why they are second best)
A meta refresh tag or a JavaScript redirect can also send visitors to another page, but they run in the browser after the page loads. They are slower and less reliable for search engines than a server redirect. Use a real 301 or 302 from the server whenever you can. Use a client-side redirect only if you have no access to the server.
A quick checklist
- Is the redirect permanent? Then it should be a 301 (or 308).
- Does each old address reach its final page in one hop?
- Does the final page return a normal 200 status?
- Does the destination match the topic of the old page?
- Have I updated internal links, canonical tags and the sitemap?
- Are there no loops, and does the page open in a private browser window?
- Did I back up .htaccess before editing?
- Have I tested the four versions of my home address?
Common questions
Do 301 redirects hurt SEO?
Correct redirects are a normal part of running a site. Long chains, loops and irrelevant destinations are the problems.
Is a 302 always wrong?
No. It is the right choice when the move is truly temporary.
How many redirects are too many?
Aim for one hop. If you find two or more in a row, flatten them.
Can I redirect a deleted page to the home page?
It is usually better to redirect to a closely related page, or to let the page return a 404 or 410 if no replacement exists.
How long should I keep a redirect?
At least a year for a site move, and for single pages as long as the old address is still used.
Why does my redirect still show the old page?
Your browser or a cache plugin may have stored the old result. Test in a private window and clear your cache.
Final thoughts
Redirects are simple when you remember three rules: use a 301 when a move is permanent, send every old address to its final page in a single hop, and test the result instead of trusting the defaults.
Take ten minutes today to check your four home-page versions in the Redirect Checker. If you find a chain or a 302 that should be a 301, fix it first, then retest.