Use a 301 when the original URL has a lasting replacement. Use a 302 for a temporary detour when the original URL should remain the long-term address. Then test the response, destination and user journey; choosing a number is only the start of a reliable redirect.
A redirect is an instruction delivered when someone requests an address. It helps a browser or crawler continue to a different location. The important decision is not which status code sounds more powerful for SEO. It is whether the original resource has moved permanently or whether you expect to restore its normal role.
This guide uses four practical scenarios, an HTTP comparison, a small Apache example and a test worksheet. The example domains and responses are illustrative. Apply the reasoning to the URLs you control, and verify what the server actually sends after your configuration reaches the live site.
What changes between a 301 and a 302?
Both responses direct the requester elsewhere, usually through a Location header. Their stated meaning differs. A 301 declares a permanent move; a 302 describes a temporary one. Google interprets permanent redirects as a stronger canonicalization signal toward the destination than temporary redirects. Its redirect documentation explains those indexing distinctions.
| Question | 301 | 302 |
|---|---|---|
| Intended duration | A lasting replacement. | A temporary change. |
| Typical scenario | An old service URL moves to its new address. | An existing page temporarily routes elsewhere. |
| Ongoing maintenance | Update your own links to the destination. | Record when the original route should return. |
| Important verification | The replacement genuinely fulfills the old page’s purpose. | The detour is appropriate and has a clear end condition. |
The response code cannot repair a poor destination. Sending a discontinued tutorial to an unrelated homepage may confuse readers even when the server correctly returns 301. Make the content decision first. Identify what a person following the old link reasonably expects to find, then choose a destination that serves that expectation.
Four scenarios that make the decision clearer
A service URL is renamed
The same repair service moves from /repair/ to /services/device-repair/. If the new route is the lasting address and covers the same task, a 301 is a sensible permanent mapping.
A temporary campaign detour
A page temporarily sends visitors to a relevant campaign experience, while the original address will resume its role afterward. A 302 can express that temporary intention.
Two articles are consolidated
You replace overlapping guides with one complete resource. Map each old URL to the genuinely relevant replacement and use a permanent move where that consolidation is final.
There is no appropriate replacement
A removed item has no useful equivalent. An honest removal response may be preferable to an unrelated redirect. “Every old URL must redirect somewhere” is a poor migration rule.
For a temporary campaign, define who owns the rollback and what happens when the campaign ends. A note saying “temporary” in a spreadsheet does not cause the server to remove the redirect. For a permanent consolidation, confirm that the replacement still covers details existing readers may need, including old examples or product distinctions.
Do not use the redirect as a substitute for a content decision
Consider an imaginary store with a removed blue jacket. A newer blue jacket with similar features may be a helpful replacement. A generic winter-clothing page might be too broad, while the homepage is broader still. The right choice depends on what remains available and what the visitor’s old bookmark represents.
Record that decision in the mapping document. A developer implementing two hundred rows cannot infer the intended relationship between every old product and every current category. Good redirect work begins with a useful inventory and a named reviewer, not a broad pattern that sends everything to one destination.
Write an explicit redirect map
Before editing configuration, list the old address, final destination, intended status and reason for the change. Use the final canonical destination rather than another old address that already redirects. Check whether the old route receives meaningful traffic or external links, but avoid inventing value estimates when those reports are unavailable.
old_path,new_url,status,reason,owner
/repair/,https://example.com/services/device-repair/,301,service renamed,site owner
/summer-offer/,https://example.com/current-offer/,302,temporary campaign,marketing
/old-guide/,https://example.com/guides/complete-guide/,301,articles consolidated,editor
Keep the reason concrete. “SEO improvement” does not explain whether a mapping should survive a future redesign. “The repair service was renamed; the replacement includes the same booking process” does. For each temporary row, add an end condition and review date. For each permanent row, identify internal links that should be updated directly.
Implement the smallest rule that matches the plan
Use your platform’s supported redirect mechanism where possible. On WordPress this may be a well-maintained redirect feature or carefully managed server configuration. Understand which layer owns the rule: the CDN, hosting panel, web server, application or plugin. Two layers can apply incompatible rules to the same request.
RewriteEngine On
RewriteRule ^old-service/?$ /services/device-repair/ [R=301,L]
This example matches a specific path in an Apache .htaccess context. It is not an instruction to replace an existing WordPress configuration. Directory scope, existing rewrite rules, destination hosts and caching all matter. Adapt the rule in an appropriate test environment and check the actual request before wider use.
The 301 redirect generator can prepare an exact-path starting rule. Review its output against the server context and your mapping document. Avoid a wildcard covering all missing pages unless you have deliberately verified that every covered path has a useful, equivalent destination.
Account for methods and application behavior
A simple article request is not the same as a payment submission or an API call. Redirect behavior around request methods and bodies needs application-specific care. The HTTP specification distinguishes method-preserving 307 and 308 responses from historical handling of 301 and 302. See HTTP Semantics when you are designing behavior beyond ordinary navigation.
For an application route, involve the person responsible for that workflow. Test the intended method with safe data and verify that a redirect does not repeat or discard a consequential action. A browser successfully opening the destination is not enough evidence about how a form submission or webhook will behave.
Test the response and the entire destination path
First request the old URL without following redirects so you can inspect the first response. Confirm its status and Location value. Then follow the path and check the final destination. Using both views prevents a successful final page from hiding an incorrect first rule or a sequence of unnecessary hops.
curl -sS -D - -o /dev/null https://example.com/old-service/
curl -sS -L -D - -o /dev/null https://example.com/old-service/
These examples use a Unix-style null device. On Windows, adapt the output destination to your shell or inspect the request in browser developer tools. Header-only checks using HEAD can be convenient, but an application may treat HEAD differently from GET. Test the actual navigation method when results disagree.
- The first response matches the planned status.
- The Location value points to the intended HTTPS URL.
- The path does not loop or pass through unrelated intermediate pages.
- The final page returns an appropriate success response and useful content.
- Important parameters and the visitor’s main task behave as intended.
Check details that are easy to miss
Test a normal address and any relevant trailing-slash, hostname or protocol variants. If a link can legitimately include a query parameter, decide whether that parameter should remain. A tracking parameter and a product-selection parameter do different jobs. Preserving every parameter indiscriminately can create confusing duplicates; dropping all of them can break the destination’s meaning.
Open the destination on a phone and complete the expected action. For a renamed service page, that could mean finding the correct service details and reaching the booking form. For a consolidated article, it means reaching the section that answers the old article’s question. Redirect tests should include the experience the mapping was created to preserve.
Retest after cache purging
Permanent responses may be cached by browsers or intermediaries. After a rule changes, compare a fresh request with the behavior you see in your regular browser. Keep a dated record of the response at each layer you can inspect. Do not conclude that a live server rule is wrong solely because an older client cache still follows a previous route.
During a planned migration, keep a copy of the previous rules and the mapping file. If you need to roll back, restore the intended behavior at the responsible layer and repeat the same tests. A clear owner and a reproducible test are more useful than a message saying “the redirect should be fixed now.”
Update the signals you control after a permanent move
Change your own navigation, article references and sitemap entries to the new address. Inspect the destination’s canonical declaration and make sure it describes the preferred final URL. A permanent redirect can support the move, but leaving every internal reference aimed at retired routes creates avoidable navigation and maintenance work.
Use the link extractor to inspect supplied HTML for old destinations, and the canonical tag checker to examine the supplied page declaration. Neither tool proves Google’s current index selection. If canonical versions are the central issue, continue with the canonical tags guide.
Download the worksheet and record the planned mapping, actual first response, final response and task test. Give temporary redirects a review date. Give permanent mappings a destination-content check.
Rehearse a small migration before changing a whole section
Consider a fictional workshop renaming three service addresses. The team chooses the final pages, verifies that each still explains the same service and records a permanent mapping. Before applying a broad rule, they test one ordinary URL, one URL with a meaningful query string and one path that should remain untouched.
The ordinary path should lead to its intended replacement. The query-string case needs an explicit decision: preserve parameters that the destination needs, remove only those that are deliberately obsolete and verify the actual resulting address. The unaffected path should continue to behave normally. This last test catches a rule that matches more broadly than its author intended.
Now check an unknown path. A generic catch-all that sends every missing address to a service page can conceal errors and confuse visitors. Record what the site should do when no relevant replacement exists. Include that case in the acceptance sheet instead of testing only URLs you expect to pass.
Keep the implementation and rollback owned
Save the previous configuration and name the person who can restore it. Record whether a CDN, hosting rule or WordPress component owns the redirect. If multiple layers exist, identify the order a request encounters them. That makes a loop easier to diagnose than a situation where each team assumes another layer is responsible.
After release, repeat the same requests against production and follow a few ordinary internal links. A successful staging result is not evidence that the live rule was deployed correctly. Keep the final responses and test time with the mapping document. Later, review reported failures and meaningful usage before changing the plan; do not silently remove a mapping because it is no longer visible in the main navigation.
Frequently asked questions
Is a 302 automatically bad for SEO?
No. A temporary redirect is appropriate when the move is temporary. The problem is a mismatch between the site’s intention, implementation and destination, rather than the mere presence of 302.
Can I delete permanent redirects after updating internal links?
Old bookmarks and external links may still use the retired addresses. Treat redirect retention as part of the migration plan, and review current search-engine guidance and real usage before removing mappings.
Does a 301 guarantee the new page will rank the same?
No. The destination, content changes, crawl processing and many other conditions still matter. A correct redirect is a technical implementation, not a ranking guarantee.
Reviewed October 28, 2026. Sources: Google’s redirect guidance and HTTP Semantics linked above. All mapping rows, commands and decision scenarios are instructional examples, not reported migration outcomes.
