You are moving a page. The old URL has traffic, links from other sites and a spot in search results. The new URL is ready. Now someone asks a short question with long consequences: 301 or 302? Both codes send a visitor to the new address, but they make opposite promises about the future, and browsers and search engines act on those promises in ways that are expensive to reverse.

This guide explains what each code promises, how search engines and browsers treat them differently, and how to check both codes in the free HTTP Status Code Checker on Ovatly before you commit to one.

Contents

  • Quick answer
  • What the 3xx class is really saying
  • The 301 promise: this move is forever
  • The 302 promise: this move is temporary
  • The cost of picking the wrong one
  • How to check both codes, step by step
  • Worked example: comparing 301 and 302 in the reference
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Use a 301 when the page has moved for good: the old URL is retired, and you want search engines to transfer its ranking signal to the new URL. Use a 302 when the move is temporary and the original URL will serve the page again: the old URL keeps its indexed position. Both are 3xx codes, the class whose rule of thumb is "look elsewhere", but permanence is the whole decision. If you are unsure what a code promises, paste it into the HTTP Status Code Checker and read its card before you change anything live.

What the 3xx class is really saying

Every HTTP status code belongs to a class, and the class gives you the headline before the detail: 2xx means it worked, 3xx means look elsewhere, 4xx means the request was at fault, and 5xx means the server was. A redirect code is the server saying: what you asked for is not here, try this other address instead.

Within the 3xx class, individual codes refine that message: some say the move is permanent, some say temporary. The 301 and 302 pair is the one site owners meet most often, because almost every page move or URL cleanup runs through one of them.

The 301 promise: this move is forever

A 301 is named Moved Permanently, and both halves of its audience take the name literally.

Search engines treat a 301 as an instruction to retire the old URL. Over time they drop it from the index and pass the ranking signal it had earned, its links, relevance and history, across to the new URL. That transfer is exactly what you want when a page has genuinely relocated.

Browsers treat a 301 as worth remembering. A browser that receives one caches it hard: on later visits it may skip asking the server at all and go straight to the remembered destination. That makes repeat visits fast, and a mistaken 301 remarkably sticky, which is the risk covered below.

The 302 promise: this move is temporary

A 302 is named Found, and in practice it is read as a temporary redirect: use this other address for now, but the original URL is still the real home of this page.

Search engines respond by keeping the original URL in the index and its ranking signal attached to it. The destination page is visited, but treated as a stand-in. Browsers likewise do not lean on a 302 the way they lean on a 301, because the arrangement is expected to end.

That makes the 302 the right tool for genuinely short arrangements: a maintenance holding page, a brief test of a new layout, or a temporary substitution while the real page is unavailable.

The cost of picking the wrong one

Choose a 301 for a move that turns out to be temporary, and the undo is painful. You can remove the redirect from your server in a minute, but you cannot reach into every visitor's browser and clear the cached instruction. People keep landing on the destination you no longer want, and search engines have already begun retiring the original URL. Recovery is slow and partly out of your hands.

Choose a 302 for a move that is actually permanent, and the cost is quieter but just as real. Search engines keep the old URL indexed as the canonical page and hold back on consolidating its signal into the new one. Months later, the old URL still shows in results, the new page ranks below where the old one did, and the link equity you meant to carry over has leaked away. Nothing looks broken, which is why this mistake survives so long before anyone traces it.

How to check both codes, step by step

Before you ship a redirect, confirm what each candidate code actually promises:

  1. Open the HTTP Status Code Checker.
  2. Type the bare code, 301, and read the explanation card: its class, what it means and the common causes.
  3. Clear it and type 302. Read its card the same way, and compare the permanence wording side by side.
  4. If you have a real response line from your server or logs, paste the whole line instead. The tool extracts the code from it, the same way pasting HTTP/1.1 503 Service Unavailable extracts 503.
  5. Browse the reference table below the result for the neighbouring codes too. It covers the standard codes developers meet daily, 30 codes across the 1xx to 5xx classes.

Worked example: comparing 301 and 302 in the reference

Say your shop is retiring the URL /summer-sale-2024 and its content now lives permanently at /sale. You paste 301 into the checker and the card confirms the class, Redirection (3xx), and the meaning: the resource has moved permanently and future requests should use the new URL. You then paste 302 and the card describes a temporary move, with the original URL remaining the one to keep.

That comparison settles the config choice: the sale page is not coming back at the old address, so the redirect is written as a 301, and the ranking signal follows the content to /sale. Had the old page been down for a weekend of maintenance instead, the same check would have pointed at the 302.

Limitations

The checker is a reference, not a testing tool. It explains codes you paste in: a bare number, a full response line or a keyword. It never fetches a URL, never contacts your server and cannot tell you which redirect your site is currently sending. To see a live response, use your host's tools, your server logs or a header inspection in your browser. And while the checker can confirm what a code promises, it cannot make the permanence decision for you. Only you know whether the move is truly forever.

Common mistakes

  • Defaulting to 301 for everything. It gets used for maintenance pages and short tests, where its hard caching turns a weekend change into a lasting detour.
  • Leaving a 302 running after a permanent move. The redirect works, visitors arrive, and nobody notices that the old URL still owns the search presence the new page needs.
  • Changing your mind after a 301. Removing it server-side does not clear it from browsers that cached it. Treat a 301 as a commitment, not a draft.
  • Redirecting in chains. Sending an old URL to a second URL that itself redirects adds delay and muddies the signal. Point each retired URL straight at the final destination.

FAQs

What is the core difference between a 301 and a 302? A 301 means the page has moved permanently, so search engines move the ranking signal to the new URL and browsers cache the redirect. A 302 means the move is temporary, so the original URL stays indexed and the redirect is treated as short-lived.

Why is a 301 hard to undo? Browsers cache 301 responses aggressively, often for a long time. Even after you remove the redirect on the server, visitors whose browsers cached it keep being sent to the old destination until the cache expires or is cleared.

What happens if I use a 302 for a permanent move? Search engines keep treating the original URL as the real page and hold back on transferring its full ranking signal to the new one. The new page can underperform for months while the old URL refuses to leave the index.

Can the HTTP Status Code Checker test my redirect live? No. It is a paste-based reference: you type a code, a response line or a keyword and it explains the class, the meaning and the common causes. It never fetches or tests a live website.

Which redirect should I use during site maintenance? A temporary one. A 302 tells visitors and search engines the original page will be back, so its indexed position is preserved while the holding page is shown.

Conclusion

The 301 versus 302 choice is really one question: is this move forever? If yes, the 301 carries the page's search value to its new home, at the price of being hard to reverse. If no, the 302 borrows a destination for a while and leaves the original URL's standing untouched. When the next code on your list is a 5xx rather than a redirect, the companion guide on what a 500 Internal Server Error means explains where that class points instead. The developer tools guide archive collects every guide in this cluster.