Redirects in SEO: When to Use 301, 302, 307 and 308

Seo Redirects Moving Visitors From An Old Website Url To A New Page

A redirect sends a visitor and a crawler from one URL to another. It is useful when a page has genuinely moved, a site changes domain, or several old URLs have a relevant replacement. The right rule depends on whether the move is permanent or temporary. A redirect is not a general fix for every 404, duplicate page or ranking drop.

For SEO, the key choice is usually between a permanent server-side redirect and a temporary one. Google treats permanent redirects as a signal that the destination should become canonical. Temporary redirects are followed, but do not send that same canonicalisation signal in Google’s indexing pipeline. Neither type guarantees that a page will keep its rankings or traffic.

Illustration Of Visitors Moving From An Old Website Address To Its New Location
A redirect sends visitors and crawlers from an old URL to its intended destination.

Redirect status codes and SEO

HTTP redirects use a 3xx status code and a Location header to tell the browser where to make its next request. The codes below are the ones most likely to matter during an SEO audit or site migration.

Status Meaning Typical use What Google Search understands
301 Permanent redirect. A page or URL has moved for good. Google treats it as a signal that the destination should be canonical.
308 Permanent redirect that preserves the request method. A permanent move where the original HTTP method must remain unchanged. Google treats it as a permanent redirect and a canonicalisation signal.
302 Temporary redirect. A temporary campaign page or short-lived change of destination. Google follows it but does not use it as a canonicalisation signal.
303 Temporary redirect to another resource, usually retrieved with GET. A web application redirects after processing a form submission. Google treats it as temporary rather than as a permanent move.
307 Temporary redirect that preserves the request method. A temporary move where a POST request must remain a POST request. Google follows it but does not treat it as a permanent canonicalisation signal.
Meta refresh (0 seconds) A page-level redirect that happens immediately. A fallback when a server-side redirect cannot be configured. Google treats an immediate meta refresh as a permanent redirect.
Delayed meta refresh or JavaScript A redirect handled by the page or browser rather than by an HTTP server response. A last resort when server-side redirects cannot be used. Google treats delayed meta refresh as temporary and JavaScript location redirects as permanent, but server-side redirects are preferred.

For SEO, the important distinction is not that one code “passes link equity” and another does not. Google’s documentation describes permanent redirects as a canonicalisation signal and temporary redirects as non-permanent. Google may use other signals when selecting a canonical URL, and no redirect guarantees a particular ranking outcome.

There is also an HTTP behaviour difference. A 307 or 308 preserves the original request method. With 301 and 302, clients may change a POST request to GET when following the redirect. A 303 directs the client to retrieve the target, usually with GET. This distinction matters for forms, checkout flows and APIs. For ordinary page URL changes, a server-side 301 is common; choose a code that matches the application behaviour as well as the permanence of the move.

When should you use a redirect?

Use a permanent redirect when a URL has a genuine, lasting replacement. Common examples include changing a page slug, moving a site from one domain to another, consolidating pages into a single useful resource, or changing a URL structure. During a UK business rebrand, for example, map each old .co.uk URL to its closest equivalent on the new domain rather than sending every old page to the new homepage.

Use a temporary redirect when the original URL is expected to return. Examples include temporarily routing visitors around a short-term service issue or directing users to a seasonal campaign while keeping the original page available for later use. If a promotion ends and the destination is no longer relevant, remove the temporary rule and restore the original URL or choose another appropriate response.

A redirect is not the same as a canonical tag. A redirect sends the browser to another URL. A canonical annotation asks search engines to consider a preferred URL while leaving the page accessible. If a page has permanently moved, use a redirect. If similar accessible URLs need to remain available, review canonicalisation instead. Read more about canonical URLs.

Do not redirect a deleted page to an unrelated destination just to avoid a 404. If there is no relevant replacement, returning a genuine 404 Not Found or 410 Gone response can be more accurate. Redirecting large groups of unrelated URLs to the homepage may confuse users and can be treated as a soft 404 by Google.

How to plan redirects for a site move

A migration is easier to manage when each old URL has an intentional destination. Before changing the site, export URLs from the current sitemap, analytics and Search Console. Add important backlinks or high-traffic URLs to the list as well. Then map each old page to the closest relevant new page. Do not rely on a blanket rule that changes only the domain or sends all paths to one destination unless the content structure truly remains equivalent.

For a small or medium-sized site, Google recommends moving the URLs together where practical. For a larger site, a staged move can make problems easier to isolate. In either case, test the rules on a staging environment or a small representative set before rolling them out widely.

Once the new URLs are live, update internal links so visitors do not have to pass through redirects on every visit. Update canonical tags, hreflang annotations where used, structured references and the XML sitemap to point to the new URLs. Submit the new sitemap in Search Console and monitor both old and new URL patterns during the transition.

Keep redirects in place for as long as possible. Google’s site-move guidance says to keep them for at least a year in general, and longer where users or external sites still rely on the old URLs. A redirect is not a substitute for updating links you control.

Website Migration Planning With Old Page Records Mapped To Relevant New Pages
A clear URL map helps prevent missed pages and irrelevant redirects.

How to implement a redirect

For SEO-sensitive URL changes, use a server-side redirect when your hosting environment allows it. The exact implementation depends on the web server, CMS and application. Ask your hosting provider or developer to review rules before adding them to a live site, especially when a rule uses patterns or affects many URLs.

Apache .htaccess example

On an Apache server with mod_alias enabled, a simple permanent redirect can be written as follows. The path on the left is relative to the site root, and the destination uses HTTPS.

Redirect permanent "/old-page/" "https://www.example.com/new-page/"

Apache’s Redirect directive matches URL paths by prefix and may append the remaining path to the destination. Check the rule against the exact old and new URLs. Complex patterns may need a different directive or server configuration.

PHP example

In a PHP application, send the status and destination before any page output. Use 301 only when the move is permanent.

<?php
header('Location: https://www.example.com/new-page/', true, 301);
exit;
?>

For a temporary move, use the status that matches the application’s needs, such as 302. If preserving the original request method is required, consider 307 for a temporary move or 308 for a permanent one. Test form submissions and other non-GET requests after implementation.

WordPress options

WordPress redirects can be managed through hosting controls, server configuration, a suitable plugin or custom development. The Redirection plugin is one available option. Check the plugin’s current documentation and test its rules before using it on a live site.

Google Search Console does not create redirect rules. Use it to inspect URLs and monitor indexing. Search Console’s URL Inspection tool can help check how Google sees a URL, while a crawler or command-line request can test the redirect response itself.

Common redirect problems and how to fix them

Redirect chains

A chain occurs when one URL redirects to another URL that redirects again before reaching the final page. For example, /old-page/ may redirect to an intermediate URL, which then redirects to /current-page/. Point the original URL directly to the final destination wherever possible. Googlebot can follow multiple hops, but Google recommends keeping chains short, ideally no more than three hops and fewer than five.

Redirect loops

A loop occurs when redirect rules send a URL back to itself or create a circular path between URLs. Browsers eventually stop following the requests and show an error. Check conflicting rules in the CMS, plugin, server configuration and CDN, then test the full path after changing one rule at a time.

Redirecting to an error or irrelevant page

Every redirect destination should return a valid response and satisfy the likely need of someone visiting the old URL. A redirect that ends at a 404 page is usually a configuration mistake. A redirect to a generic homepage may also be irrelevant. When there is no useful replacement, return a 404 or 410 rather than forcing an unrelated destination.

Mixing redirects with canonical tags

Redirects and canonical tags can send conflicting signals if they point in different directions. After a move, the destination should normally return a successful response and use a self-referencing canonical URL. Review the page’s canonical, internal links and sitemap alongside the redirect rule. For more on internal links, see our guide to internal linking for SEO.

Redirecting every URL during a migration

A domain change does not mean every old path has an equivalent on the new site. Prepare a URL map and choose a close replacement only when one exists. If several pages have been deliberately consolidated into a genuinely useful new page, redirect those old URLs to it. Otherwise, return an appropriate not-found response.

Conceptual Visual Of A Direct Url Path Compared With A Tangled Redirect Chain And Loop
Keep each redirect purposeful and send users to the most relevant live page.

Redirect testing checklist

Check Stage What to do Why it matters
✓ Confirm the move Decide whether the change is permanent and identify the closest relevant destination. The purpose determines the redirect type and target.
✓ Map old to new Record each old URL, its target, intended status code and reason for the change. A URL map reduces missed pages and irrelevant redirects.
✓ Test the response Check the status code, Location header and final destination for representative URLs. A rule can look correct in a plugin but fail on the live server.
✓ Check the full path Look for chains, loops, mixed protocols and destinations that return an error. The final response matters as much as the first redirect.
✓ Update site signals Update internal links, canonicals, hreflang where used and the XML sitemap. Users and crawlers should discover the destination directly.
✓ Monitor after launch Review crawl errors, indexing, traffic and important landing pages in Search Console and analytics. Monitoring helps reveal broken mappings and unexpected drops.
✓ Keep useful rules live Retain migration redirects for at least a year and longer where old links or users still need them. External links and bookmarks may continue to use the old URLs.

To inspect a redirect from a terminal, you can request the old URL and read the response headers:

curl -sS -o /dev/null -D - https://www.example.co.uk/old-path/

To follow the redirect chain and see where it ends:

curl -sS -L -o /dev/null -w 'Final URL: %{url_effective}\nStatus: %{http_code}\nRedirects: %{num_redirects}\n' https://www.example.co.uk/old-path/

Run tests against the exact URL variants that matter, including HTTP and HTTPS, with and without www, trailing slashes and any query strings that should be retained. For large migrations, crawl a representative set and keep a record of expected and actual destinations.

For wider crawl and indexing issues, see our technical SEO guide.

Tools for managing redirects

A crawler such as Screaming Frog SEO Spider can identify redirect responses, chains and loops across a site. Search Console helps you inspect URLs and monitor indexing, but it does not create redirect rules. On WordPress, a plugin such as Redirection can be one way to manage rules if it suits your hosting and maintenance setup.

For larger sites, keep a redirect register with the old URL, destination, status code, reason, date implemented, owner and test result. This makes later migrations easier to audit and reduces the risk that an important rule is removed accidentally.

Frequently asked questions

What is the difference between a 301 and a 302 redirect?

A 301 indicates that a URL has moved permanently. A 302 indicates a temporary move. Google treats 301 as a permanent canonicalisation signal and 302 as temporary. Choose the status that reflects the real duration of the change.

When should I use a 307 instead of a 302?

Both are temporary redirects. A 307 preserves the original request method, which matters for requests such as POST. A 302 may be appropriate for ordinary temporary page redirects where that method-preservation requirement does not apply.

What is the difference between a 301 and a 308?

Both indicate a permanent move to Google Search. At the HTTP level, 308 preserves the request method, while clients may change the method when following a 301. For a standard page URL change, a 301 is common; use 308 when preserving the method is important to the application.

How long should I keep a redirect?

Keep it for as long as possible. Google generally recommends at least one year for site-move redirects. Keep important redirects longer when external links, bookmarks or other users may still rely on the old URL.

Should I redirect a deleted page to the homepage?

Only if the homepage is genuinely the relevant replacement, which is uncommon. Redirect users to the closest useful page when one exists. If there is no suitable replacement, return a 404 or 410 response rather than redirecting to an unrelated page.

Do redirects preserve rankings?

No redirect guarantees rankings. A permanent redirect helps Google understand that a page has moved and should be replaced by the destination in search results. The destination still needs to be relevant, accessible and useful, and search visibility may fluctuate after a move.

Can I use a canonical tag instead of a redirect?

Use a canonical tag when the page should remain available but you want to indicate a preferred URL. Use a redirect when the old URL should send users and crawlers to a new one. They solve different problems.

Does Google Search Console create or manage redirects?

No. Redirects are configured in your server, CMS, hosting platform or application. Search Console can help you inspect URLs and monitor how Google indexes them after a change.

When redirects reflect the real destination, they help visitors reach the right page and give search engines a clearer view of URL changes. Plan the mapping, use the correct permanent or temporary response, test the final destination and update the links you control. For major migrations, follow Google’s site-move guidance and review the response codes in its documentation on redirects and Google Search.

//
Hi.
How can I help?