What a redirect does and why the code matters
A redirect sends both people and search crawlers from one URL to another. Along with the new address, your server returns a numeric status code that explains why the move happened.
A customer tapping a link in your Instagram bio or Telegram channel will not notice anything. For a crawler, though, the code is an instruction: it determines which page appears in search results and which one slowly drops out.
301 vs 302 redirect: the difference for search engines
A 301 says the page has moved permanently, so use the new address. Over time the search engine swaps the old URL for the new one and passes over what the old page had earned: backlinks, history and user behaviour.
A 302 says the content is somewhere else for now, but the original address remains the main one. As a rule, the old URL stays in the index and signals do not move.
If a temporary redirect stays in place for a very long time, search engines may start treating it as permanent. Do not rely on that. Set the right code from the start.
When to use a 301
Use a 301 whenever you do not plan to return to the old address.
- changing domains or moving from http to https
- merging www and non-www versions, with and without trailing slash
- a new URL structure after a redesign
- combining several similar pages into one
- a discontinued product or service that has a direct replacement
- moving a blog post to another section
When a 302 makes sense
A temporary redirect fits cases where the original URL should remain in search while visitors are sent elsewhere for a while.
- a seasonal promotion that a permanent address temporarily points to
- a page under maintenance, with visitors sent to a neighbouring section
- an A/B test that sends part of the traffic to a page variant
- an item out of stock that you point to a similar one, planning to bring it back
What about 307 and 308
These are stricter equivalents: 307 is temporary and 308 is permanent. They preserve the request method, for example when an order form is submitted. For search engines, 308 behaves like a 301 and 307 like a 302. On ordinary pages there is no practical difference, so most sites use the familiar pair.
If your browser shows a 307 when going from http to https, that is often the browser's own internal mechanism, not a response from your server.
Common mistakes and how to check the code
The most frequent mistake is a 302 where a 301 belongs. Many CMSs, plugins and website builders default to a temporary redirect. After a migration, old pages linger in the index while new ones gain visibility slowly. Look at the code your server actually returns, not at the setting in the admin panel.
The second mistake is sending every deleted page to the homepage. Search engines often treat that as a soft 404, and it gives the visitor nothing useful. If a page has no replacement, an honest 404 or 410 is better. The third is redirect chains, where A points to B and B points to C. Each hop slows crawling, so point A straight to C.
Checking is simple: open your browser's developer tools, go to the network tab, load the old URL and read the status in the first line. For hundreds of addresses after a migration, feed the list into a crawler or an online response checker.
An example: an online shop stops selling a phone model because a newer version has arrived. If the old one will not return, 301 it to the new model or its category. If stock is merely delayed, keep the page with an out-of-stock note and alternatives. No redirect is needed, and the page keeps its rankings.
A short rule for choosing
Ask yourself whether the old address will come back. If not, use a 301. If yes, and soon, use a 302. When in doubt, you most likely need a 301, because genuinely temporary moves are rarer than they seem.
If traffic dropped after a domain change or redesign, start by auditing status codes. The markdev team does this as part of SEO optimisation in Uzbekistan: finding chains, wrong 302s and lost pages. Tell us about your situation and we will suggest where to begin.
FAQ
What is the main difference between a 301 and a 302 redirect?
A 301 signals a permanent move, and the search engine replaces the old URL with the new one. A 302 signals a temporary measure, and the original URL usually stays in the index.
Can I use a 302 when moving to a new domain?
You should not. A permanent move needs a 301, otherwise old URLs remain in the index longer and the new ones gain visibility more slowly.
Should deleted pages redirect to the homepage?
No. Search engines often treat this as a soft 404. Redirect to the closest relevant page, or return 404 or 410 if there is no replacement.
How can I quickly check which code a page returns?
Open your browser's developer tools, go to the network tab, load the URL and read the status code. For many URLs, use a crawler.
Let’s look at your task for free
Leave your contact — in a 15-minute call we’ll show where leads get lost and what to fix first.