The difference between 301 and 302 redirects is simple: a 301 means "this page has moved permanently", while a 302 means "this page is over there for now". Browsers take visitors to the new address in both cases, but Google takes the signal into account when deciding which address to keep in its index. Choosing the wrong code can leave the old address in the index, delay the new one from appearing, or create unnecessary chains. In this article we explain the difference, its SEO impact, and how to implement it correctly in plain terms.
What is a redirect?
A redirect is when the server forwards a request for one address to another address. The server returns a
status code starting with "3xx" and a Location header containing the new address; the browser or
Googlebot then goes to the new address. Redirects are needed in situations such as:
- The address of a page (its slug) has changed.
- You have moved your site from http to https or from one domain name to another.
- A deleted page has a similar page that replaces it.
- You want to consolidate variations such as www and non-www, or a trailing slash, into one version.
The difference between 301 and 302
| 301 (Moved Permanently) | 302 (Found) | |
|---|---|---|
| Meaning | Permanent move | Temporary redirect |
| Message to Google | The new address should be the main version | The old address should remain the main version |
| Address kept in the index | Usually the target address | Usually the source address |
| Browser cache | Can be cached strongly | Usually not cached |
| Typical use | Migration, https switch, slug change | Maintenance, A/B testing, seasonal campaigns |
According to Google's documentation, a permanent redirect is a strong signal that the target address should become the canonical address, while a temporary redirect is a weak signal in the same direction. So when Google decides, it looks not only at the code but also at how long the redirect has been in place and at other signals. A 302 that has been in place for a very long time may eventually be treated as permanent, but rather than relying on that, it is healthier to serve the right code from the start. We covered the logic of canonical addresses separately in our canonical tag article.
SEO impact: is there a ranking loss?
For years people said that "a 301 redirect loses some of the link value, while a 302 passes nothing." The explanations from Google's search team do not point in that direction: 301, 302 and other 3xx redirects do not cause PageRank loss. So there is no need to put a 301 everywhere out of fear that a 302 passes no value, or to leave everything as a 302 for the opposite reason.
The real difference shows up elsewhere: which address will be kept in the index and shown in results. If you give a 302 to a page you have permanently moved, the old address may keep staying in the index, users keep running into the old address, and your reports end up split between the two addresses. Conversely, if you give a 301 for a temporary operation, browsers cache the redirect, so when the operation ends it becomes harder to reflect the reversal to users.
Rule: If the move is permanent, use a 301; if it is truly temporary, use a 302. If you are unsure, test first with a 302 (it does not stay in the browser cache), and once everything works correctly, switch to a 301.
Which one to use when?
| Situation | Code | Note |
|---|---|---|
| Slug (URL) changed | 301 | The old address should go to the new one; also update internal links to the new address |
| http → https switch | 301 | Every page should go to its exact counterpart; do not redirect everything in bulk to the home page |
| Domain name change | 301 | Also use the address change tool in Search Console |
| www / non-www consolidation | 301 | Choose one version and redirect the other to it |
| Maintenance or short campaign | 302 | Remove the redirect when the work is finished |
| A/B test | 302 | Once the test ends, choose the permanent variant |
| Deleted page with no equivalent | 404 / 410 | Do not redirect to an unrelated page |
Note the last row: redirecting every removed page to the home page is a common habit, but Google often tends to treat it as a "soft 404", because you are sending users to a page unrelated to what they were looking for. You can see how such situations appear in Search Console in our Google indexing issues article.
What are 307 and 308?
HTTP has two more redirect codes. 307 is temporary and 308 is permanent, and both preserve the request method (for example POST) when redirecting. With 301 and 302, by contrast, some clients may convert a POST request into a GET. On most content sites you will not notice the difference; Google treats 308 like a 301 and 307 like a 302. If you are migrating form submissions or API addresses, 307/308 is safer.
There are also meta refresh and JavaScript redirects that run on the browser side. Google can follow these as well, but server-side HTTP redirects are faster and more reliable; prefer them whenever possible.
How to implement it (Apache and Nginx)
The examples below are meant to illustrate the concept; back up your files and test in a staging environment before applying them on your own server.
Apache (.htaccess):
Redirect 301 /eski-sayfa https://ornek.com/yeni-sayfa
Nginx:
location = /eski-sayfa { return 301 https://ornek.com/yeni-sayfa; }
In systems such as WordPress, redirect plugins or admin panels do the same job through a visual interface. Whichever path you choose, the target address must be the complete and direct final address; the target itself must not redirect to yet another place.
Mapping plan for bulk migrations
Redirecting a few pages is easy; the real challenge comes in migrations where hundreds of addresses change. In that case, instead of writing redirects one by one, follow a plan:
- Collect the list of old addresses. Using your sitemap, crawling tool output, performance data from Search Console and external link reports together reduces the number of forgotten addresses.
- Write a new counterpart for each old address. A spreadsheet with two columns, "old address → new address", is enough. For addresses with no counterpart, write "404".
- Use a pattern rule where possible. For example, if the
/blog/2023/article-namestructure becomes/blog/article-name, a single rule covers hundreds of addresses. - Try it on a test environment first. Check for chains, loops and wrong targets before going live.
- Crawl again after going live. Load the list of old addresses into your crawling tool and verify that each one reaches its new address with a single step and returns 200.
- Monitor for weeks. Watch for increases in errors in Search Console, changes in the number of indexed addresses, and the trend in organic clicks.
Short-term fluctuations after a migration are normal; the real warning sign is when, even after weeks, old addresses do not leave the index and new addresses do not appear. In that case, double-check that the redirect targets and canonical tags are consistent.
Common redirect mistakes
- Redirect chains: A → B → C. Each step adds delay; Googlebot follows a limited number of redirect steps (the documentation states up to 10). Shorten the chain to A → C.
- Redirect loops: A → B → A. The page never opens and shows an error.
- Redirecting everything to the home page: This misleads both users and Google; if no similar page exists, return a 404.
- Using a 302 for a permanent move: The old address stays in the index.
- Not updating internal links: If your site keeps linking to the redirected addresses, every click carries an extra step. Change internal links to point directly to the new address; our internal linking strategy article will help with this.
- Removing redirects too early: Keeping redirects for at least a year after a migration, and longer if they still receive traffic or links, is the approach Google also recommends.
- Leaving redirected addresses in the sitemap: The sitemap should only contain final addresses that return 200.
Testing your redirects
- Command line: The
curl -I https://ornek.com/eski-sayfacommand shows the status code and theLocationheader. - Crawling tool: A desktop crawling tool lists all redirect chains and loops.
- Search Console: The URL Inspection tool shows how Google sees an address, which address it redirects to, and the canonical it selected.
- Pages report: Review the addresses listed as pages containing redirects; if unexpected addresses appear, find their source.
During a general technical audit, you can use our technical SEO checklist to review redirects together with the other items.
Frequently asked questions
Will a 301 redirect lower my rankings?
When implemented correctly, it will not. There may be short-term fluctuations after a migration; if pages match correctly and the content is similar, the signals move over to the new address.
What happens if I leave a 302 in place for a long time?
Google may eventually interpret it as permanent, but this is not guaranteed. For a permanent move, use a 301 from the start.
How long should I keep a redirect in place?
At least one year is recommended. If the old address still receives visitors or external links, keeping it longer makes sense.
Do redirects affect page speed?
Yes, each step is an additional request. Shortening chains improves loading time.
Conclusion
In short: use a 301 for permanent changes and a 302 for genuinely temporary situations; clean up chains and loops, and update internal links and the sitemap to the new addresses. For pages with no similar counterpart, honestly returning a 404 or 410 instead of a redirect is often the more correct choice. The code itself is simple; the real work is preparing a complete table of old and new address mappings before the migration and then testing it.