A redirect tells a browser to request a different URL. The distinction between a 301 and a 302 is the intended permanence of the move: 301 means permanent, while 302 means temporary. That distinction helps search engines interpret which address should represent the content, but the correct destination matters just as much as the code.
Start with the business decision. Has a page moved for good, or should the original URL return? Choosing a status code before answering that question creates avoidable confusion.
On this page
- Use permanent redirects for permanent moves
- Use temporary redirects for temporary routing
- What about 307 and 308?
- Choose a destination that serves the same need
- A redirect migration workflow
- Keep chains short and eliminate loops
- Verify the response, not just the address bar
- How long should redirects remain?
- Separate redirect issues from content issues
- Plan a reversible implementation
- Final checks
Use permanent redirects for permanent moves
A renamed article path, a domain migration, or a retired duplicate URL can justify a permanent redirect when an equivalent destination exists. Visitors following an old bookmark should arrive at the resource that now fulfills the same purpose.
For example, a guide moved from an old date-based path to a stable descriptive path can use a 301. Update internal links and sitemap entries to the new address too. The redirect supports old references; it should not become the main route through your current navigation.
A permanent redirect communicates a strong canonicalization signal in Google’s documentation. It does not guarantee that every historical ranking or visit transfers unchanged. The quality and equivalence of the destination remain relevant.
Use temporary redirects for temporary routing
A temporary redirect can fit a short-lived alternative destination when the original address is intended to return. Document the reason, owner, and review date. Without that record, temporary configurations often become forgotten permanent behavior.
A 302 is not automatically an SEO error. Nor should you change every 302 to 301 because a crawler flags it. Inspect the purpose. A login flow, regional routing decision, or brief experiment may have requirements beyond organic search.
If the move becomes permanent, revise the implementation deliberately. Do not rely on a search engine eventually interpreting a long-running temporary redirect as permanent.
What about 307 and 308?
HTTP also provides 307 for temporary redirects and 308 for permanent redirects. These codes preserve the request method, which can matter for forms and APIs. A GET request for an article is a different situation from a POST request carrying submitted data.
For ordinary content moves, site owners often encounter 301 and 302 in their CMS or hosting controls. Developers should consider method preservation when the endpoint processes actions. Do not test a payment or other consequential submission casually just to observe a redirect.
| Code | Intended move | Typical consideration |
|---|---|---|
| 301 | Permanent | Stable replacement for a content URL |
| 302 | Temporary | Original address expected to return |
| 307 | Temporary | Preserve the request method |
| 308 | Permanent | Preserve the request method |
Choose a destination that serves the same need
A redirect from a detailed tutorial to an unrelated homepage can frustrate users and fail to preserve the original intent. Build a mapping from each old URL to its closest appropriate replacement. Where there is no replacement, a genuine 404 or 410 may be more suitable than a forced redirect.
For a discontinued product, evaluate whether there is a close successor, a useful information page, or a relevant collection that genuinely helps the visitor. Do not assume every discontinued item should follow the same rule.
Record exceptions. An article with important external references may need a preserved explanation or a more careful consolidation than a throwaway test page.
A redirect migration workflow
- Export old URLs from the CMS, sitemap, and available search data.
- Map each important URL to an equivalent destination or an intentional removal.
- Check that destination pages are live, useful, and indexable where intended.
- Implement rules in the appropriate hosting, server, or CMS layer.
- Update internal links, canonical tags, and sitemap entries.
- Test representative paths and edge cases before and after launch.
- Monitor failures and unexpected landing pages.
Use explicit rules for important exceptions and test broad patterns carefully. A regular expression that works for one article can accidentally capture media, administrative paths, or a different language directory.
Keep chains short and eliminate loops
A chain such as old URL to intermediate URL to new URL adds requests and complicates troubleshooting. Where you control the rules, send the original address directly to the final equivalent. Confirm that the final page does not redirect back to an earlier address.
Common loop causes include conflicting HTTPS settings, competing trailing-slash rules, and mismatched host preferences between the application and proxy. Fix the conflicting configuration rather than adding another redirect on top.
Inspect both common URL variants and the actual links users are likely to follow. A test of only the final URL does not validate the redirect.
Verify the response, not just the address bar
A browser can appear to reach the right page through different mechanisms. Inspect response codes and the Location header to confirm a server-side redirect. JavaScript and refresh-based navigation have different operational characteristics and may introduce extra dependencies.
For each mapping, record the requested URL, each intermediate response, and the final destination status. Then check the destination content. An automated test that confirms only a 200 response can miss a redirect to the wrong article.
Also test query parameters deliberately. Some contain useful tracking or functional information; others should not survive a move. Decide which ones need preservation instead of silently dropping or copying all parameters.
How long should redirects remain?
Treat redirects as part of maintaining published URLs. Old links, bookmarks, and references can remain useful long after a redesign. Removing a working permanent redirect simply because launch is over can create avoidable dead ends.
For substantial moves, follow the current search-engine migration guidance and retain the configuration long enough for users and crawlers to adapt. Review long-term maintenance with the person responsible for hosting, especially when domains or certificates must remain active.
Keep an inventory of rules and their purpose. This is particularly useful when a second redesign occurs and historical redirects need to point directly to the newest destination.
Separate redirect issues from content issues
If search traffic changes after a migration, do not blame the status code without evidence. The move may also have changed titles, content, navigation, rendering, and URL relationships. Compare representative old and new pages and inspect access before drawing conclusions.
A correct redirect to a materially weaker page does not recreate the old page’s usefulness. Conversely, an appropriate temporary redirect should not be labeled harmful solely because a reporting tool prefers permanent codes.
Plan a reversible implementation
Before changing redirect rules, save the existing configuration and decide how to undo the change. A broad rule can affect URLs outside the original migration list, so include a few unrelated pages in the acceptance check. Confirm that administrative and form routes still behave as intended.
For a small article move, the record can be brief: old URL, new URL, status code, reason, date, and owner. For a domain move, dependencies such as DNS, certificates, and hosting need their own checks. Treat the redirect as one part of the move rather than the entire migration.
When a test fails, correct the specific rule and retest its scope. Repeatedly adding exceptions without understanding the matching order can make the configuration difficult to maintain.
Final checks
Use permanent codes for permanent moves, temporary codes for temporary routing, and destinations that respect the visitor’s original task. Verify the full chain and keep related canonical and navigation signals consistent.
Primary reference: Google’s redirect guidance. For pages that must remain accessible at multiple addresses, see canonical tags.