What a redirect tells browsers and search engines
A redirect sends a visitor who requests one URL to another URL. It is useful when a page moves, a site changes its URL structure, or an old address needs to lead people to a relevant replacement. The server’s response code explains the nature of that move. A 301 says the move is permanent. A 302 says it is temporary.
Both codes can take a visitor to the same destination, so the difference may be invisible to someone using the site. For search engines, the distinction matters: it helps them decide which URL to show in search results. A redirect is a signal, not a guarantee of how or when an index will change. Search engines may also consider other signals, including internal links and the content at the destination.
Use a 301 when the old URL is not coming back
Choose a 301 when a page has moved for good and the new URL is its closest useful equivalent. Common examples include changing a page’s address, consolidating two overlapping articles into one, or moving a site from HTTP to HTTPS. A 301 helps visitors reach the replacement and signals that search engines should generally treat the new URL as the lasting location.
Before adding the redirect, check that the destination satisfies the reason someone visited the old page. A product page, for example, should not automatically redirect to the home page just because the product is unavailable. If there is no genuinely relevant replacement, an appropriate not-found or gone response may be more useful than a misleading redirect. After a permanent move, update navigation, sitemaps, and internal links to point directly to the new URL rather than relying on the redirect indefinitely.
Use a 302 when you expect the original URL to return
Choose a 302 for a short-term change when you want the original URL to remain the primary address. You might temporarily send visitors from a page that is being revised to a suitable alternative, then restore the original page when the work is complete. The important question is whether the move is genuinely temporary, not whether a 302 feels easier to undo. Either type of redirect can be changed later.
A temporary redirect does not ensure that the original URL will stay indexed forever. If it remains in place for a long time, search engines may interpret the move differently. Make a plan to review temporary redirects and remove or replace them when their purpose ends. If the destination has become the permanent home of the content, switch to a 301 and update links accordingly.
Check the experience, not just the status code
A redirect should work for people as well as search crawlers. Send each old URL to the most relevant live page, and avoid chains such as an old URL redirecting to an intermediate URL that redirects again. Multiple hops can slow navigation and make maintenance harder. Test that a redirected URL reaches the intended destination without a loop and that the final page loads successfully.
Also check whether important URL details are handled as intended. A site may need query parameters for a particular feature, while tracking parameters may not belong in the destination’s permanent address. Test representative URLs rather than assuming one redirect rule works for every page. For sitewide changes, keep a list of old and new URLs so you can spot missing pages or destinations that do not match visitor intent.
A simple decision rule
Ask: “Should visitors and search engines use the new URL from now on?” If yes, use a 301. If the original URL is expected to serve its purpose again and the detour has a clear end, use a 302. If neither URL is a good replacement for the other, reconsider whether a redirect is appropriate at all.
Finally, confirm what your site actually sends. A content management system setting may say “permanent” or “temporary,” but testing the old URL’s response code and final destination verifies the result. Redirects support a clear site structure; they do not replace relevant content, working internal links, or periodic checks for broken paths.



