{"id":1266,"date":"2023-06-06T23:09:00","date_gmt":"2023-06-06T22:09:00","guid":{"rendered":"https:\/\/organicdigital.co\/blog\/?p=1266"},"modified":"2026-09-21T11:55:33","modified_gmt":"2026-09-21T10:55:33","slug":"a-rough-guide-to-30x-redirects","status":"publish","type":"post","link":"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/","title":{"rendered":"A Rough Guide to HTTP Redirect Codes: 301, 302, 303, 307 &amp; 308"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>TL;DR:<\/strong> <br>HTTP redirects send users and search engines from one URL to another, but different 3xx status codes communicate different things. For most SEO work, a <strong>301<\/strong> is the standard choice for a permanent URL change, while <strong>302<\/strong> is temporary. <strong>307 and 308<\/strong> preserve the original request method, while <strong>303<\/strong> is mainly used when a subsequent request should use <code>GET<\/code>. This guide explains when to use each redirect, how to implement common 301s, and how to find redirect chains, loops and other problems.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Why_understanding_redirect_codes_matters\" >Why understanding redirect codes matters<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_are_HTTP_redirect_codes\" >What are HTTP redirect codes?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_are_the_different_HTTP_3xx_redirect_codes\" >What are the different HTTP 3xx redirect codes?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Is_there_a_310_redirect\" >Is there a 310 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#301_redirects\" >301 redirects<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_is_a_301_redirect\" >What is a 301 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#When_should_you_use_a_301_redirect\" >When should you use a 301 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Do_301_redirects_pass_SEO_value\" >Do 301 redirects pass SEO value?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#302_redirects\" >302 redirects<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_is_a_302_redirect\" >What is a 302 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#When_should_you_use_a_302_redirect\" >When should you use a 302 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#301_vs_302_redirects\" >301 vs 302 redirects<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#303_redirects\" >303 redirects<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_is_a_303_redirect\" >What is a 303 redirect?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#307_redirects\" >307 redirects<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_is_a_307_redirect\" >What is a 307 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#302_vs_307_redirects\" >302 vs 307 redirects<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#308_redirects\" >308 redirects<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#What_is_a_308_redirect\" >What is a 308 redirect?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#301_vs_308_redirects\" >301 vs 308 redirects<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#301_redirect_examples\" >301 redirect examples<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_one_old_URL_to_a_new_URL\" >Redirect one old URL to a new URL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_all_pages_to_the_homepage\" >Redirect all pages to the homepage<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_an_old_domain_to_a_new_domain_while_preserving_URLs\" >Redirect an old domain to a new domain while preserving URLs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_www_to_non-www\" >Redirect www to non-www<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_non-www_to_www\" >Redirect non-www to www<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_HTTP_to_HTTPS\" >Redirect HTTP to HTTPS<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#301_redirect_generators\" >301 redirect generators<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Bulk_301_redirects\" >Bulk 301 redirects<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#How_to_check_a_301_redirect\" >How to check a 301 redirect<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#How_to_check_if_a_301_redirect_is_working\" >How to check if a 301 redirect is working<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#How_to_check_301_redirects_in_bulk\" >How to check 301 redirects in bulk<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#301_redirect_best_practices\" >301 redirect best practices<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_to_the_most_relevant_destination\" >Redirect to the most relevant destination<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_directly_to_the_final_URL\" >Redirect directly to the final URL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Dont_redirect_everything_just_to_avoid_404s\" >Don&#8217;t redirect everything just to avoid 404s<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Avoid_redirect_loops\" >Avoid redirect loops<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Update_internal_links_where_possible\" >Update internal links where possible<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Keep_redirects_in_place_after_a_migration\" >Keep redirects in place after a migration<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-40\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Common_redirect_problems_and_how_to_fix_them\" >Common redirect problems and how to fix them<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-41\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_chains\" >Redirect chains<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-42\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#How_to_fix_redirect_chains\" >How to fix redirect chains<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-43\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirect_loops\" >Redirect loops<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-44\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Redirects_to_404_pages\" >Redirects to 404 pages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-45\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#HTTP_and_HTTPS_redirect_chains\" >HTTP and HTTPS redirect chains<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-46\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#www_and_non-www_redirect_problems\" >www and non-www redirect problems<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-47\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Trailing_slash_redirects\" >Trailing slash redirects<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-48\" href=\"https:\/\/daveashworth.co\/blog\/a-rough-guide-to-30x-redirects\/#Which_redirect_code_should_you_use\" >Which redirect code should you use?<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_understanding_redirect_codes_matters\"><\/span>Why understanding redirect codes matters<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;ve ever moved a website, changed its URL structure or removed a page, you&#8217;ll probably have had to deal with redirects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a <a href=\"https:\/\/daveashworth.co\/services-and-consultancy\/website-migrations-consultant\/\">website migration consultant<\/a>, they&#8217;re something I work with regularly. A badly planned redirect can send users to the wrong page, create redirect chains or loops, and leave search engines trying to work out what happened to the original URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But not every redirect means the same thing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>301 and 308 are permanent redirects. 302 and 307 are temporary redirects. 303 has a different job again, particularly when dealing with POST requests.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For most SEO work you&#8217;ll spend far more time dealing with 301s than anything else, but understanding the differences becomes important when you&#8217;re auditing a website, planning a migration or trying to work out why a particular redirect is behaving unexpectedly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is my rough guide to the main HTTP redirect codes, when I&#8217;d use each one, how they affect SEO, how to implement common redirects and how to find the problems they can create.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_HTTP_redirect_codes\"><\/span>What are HTTP redirect codes?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP redirect codes are <strong>3xx HTTP status codes<\/strong> returned by a server when the requested resource is available somewhere else or the client needs to take another action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a typical redirect, someone requests:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/example.com\/old-page\" target=\"_blank\" rel=\"noopener\">https:\/\/example.com\/old-page<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and the server responds with a redirect status and a new location:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>301 Moved Permanently<\/code><br><code>Location: https:\/\/example.com\/new-page\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The browser or crawler can then request the new URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The important part is that <strong>different 3xx status codes communicate different things<\/strong>. Some redirects are permanent, some are temporary, and some determine whether the original HTTP request method should be preserved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For SEO, the distinction between <strong>temporary and permanent redirects<\/strong> is particularly important because it helps search engines understand whether the original URL has moved for good or is expected to return.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_the_different_HTTP_3xx_redirect_codes\"><\/span>What are the different HTTP 3xx redirect codes?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Code<\/th><th>Meaning<\/th><th>Permanent?<\/th><th>Preserves request method?<\/th><th>Typical use<\/th><\/tr><\/thead><tbody><tr><td><strong>300<\/strong><\/td><td>Multiple Choices<\/td><td>No<\/td><td>N\/A<\/td><td>Multiple possible responses<\/td><\/tr><tr><td><strong>301<\/strong><\/td><td>Moved Permanently<\/td><td>Yes<\/td><td>Not guaranteed for non-GET<\/td><td>Permanent URL changes<\/td><\/tr><tr><td><strong>302<\/strong><\/td><td>Found<\/td><td>No<\/td><td>Not guaranteed for non-GET<\/td><td>Temporary URL changes<\/td><\/tr><tr><td><strong>303<\/strong><\/td><td>See Other<\/td><td>No<\/td><td>No &#8211; subsequent request is GET<\/td><td>Redirect after POST\/PUT<\/td><\/tr><tr><td><strong>307<\/strong><\/td><td>Temporary Redirect<\/td><td>No<\/td><td>Yes<\/td><td>Temporary redirect where method must be preserved<\/td><\/tr><tr><td><strong>308<\/strong><\/td><td>Permanent Redirect<\/td><td>Yes<\/td><td>Yes<\/td><td>Permanent redirect where method must be preserved<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Is_there_a_310_redirect\"><\/span>Is there a 310 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>310 isn&#8217;t a standard HTTP redirect status code.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Standard HTTP redirect responses sit within the 300\u2013399 range, but that doesn&#8217;t mean every number in that range has a defined redirect status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re seeing a 310 response somewhere, it&#8217;s likely to be application-specific or non-standard rather than a normal HTTP redirect code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"301_redirects\"><\/span>301 redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_301_redirect\"><\/span>What is a 301 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>301 Moved Permanently<\/strong> response tells browsers and search engines that a URL has permanently moved to a new location.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>https:\/\/example.com\/old-page\/<\/code> \u2192 <code>https:\/\/example.com\/new-page\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For SEO, this is the redirect I use most often. If I&#8217;m changing a URL, consolidating pages or carrying out a <a href=\"https:\/\/daveashworth.co\/services-and-consultancy\/website-migrations-consultant\/\">website migration<\/a>, a 301 tells Google that the old URL has been permanently replaced by the destination URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google recommends using server-side permanent redirects such as <strong>301 or 308<\/strong> when URLs have permanently moved.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_should_you_use_a_301_redirect\"><\/span>When should you use a 301 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d use a 301 when the URL change is intended to be permanent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Typical examples include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/daveashworth.co\/services-and-consultancy\/website-migrations-consultant\/\">Migrating a website to a new domain<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/daveashworth.co\/blog\/how-to-redirect-a-url-to-remove-a-directory-or-folder-name\/\">Changing the URL structure of a website<\/a><\/li>\n\n\n\n<li>Consolidating several pages into one<\/li>\n\n\n\n<li><a href=\"https:\/\/daveashworth.co\/blog\/how-to-convert-and-redirect-uppercase-url-characters-to-lowercase\/\">Renaming or changing the URL of a page<\/a><\/li>\n\n\n\n<li>Redirecting HTTP URLs to HTTPS<\/li>\n\n\n\n<li>Standardising <code>www<\/code> and non-<code>www<\/code> versions of a website<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The destination should be the <strong>most relevant replacement for the old URL<\/strong>. I wouldn&#8217;t automatically redirect every deleted URL to the homepage simply to avoid returning a 404.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s particularly important during a website migration, where I want each important old URL mapped directly to its closest equivalent on the new site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Do_301_redirects_pass_SEO_value\"><\/span>Do 301 redirects pass SEO value?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. A properly implemented 301 allows Google to treat the destination as the permanent replacement for the original URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wouldn&#8217;t think of this as a fixed percentage of &#8220;link juice&#8221; being passed from one URL to another. The more useful question is whether the redirect clearly maps the old URL to an appropriate replacement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If an old page has backlinks, for example, redirecting it to its genuine replacement allows those links to continue resolving through to the relevant content rather than ending at a 404.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also try to redirect old URLs <strong>directly to their final destination<\/strong> rather than creating chains such as:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A<\/code> \u2192 <code>URL B<\/code> \u2192 <code>URL C<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google can follow redirect chains, but recommends redirecting directly to the final destination where possible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"302_redirects\"><\/span>302 redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_302_redirect\"><\/span>What is a 302 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>302 Found<\/strong> response is normally used when a URL is being redirected temporarily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It tells browsers and search engines that the requested resource is currently available somewhere else, but the original URL hasn&#8217;t necessarily been replaced permanently.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s the important distinction from a 301:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>301 = permanent<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>302 = temporary<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_should_you_use_a_302_redirect\"><\/span>When should you use a 302 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d use a 302 when I genuinely expect the original URL to be used again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That could include temporarily sending users elsewhere while a page is unavailable, short-term testing or another situation where the redirect isn&#8217;t intended to represent a permanent URL change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If I&#8217;ve permanently changed a URL during a website migration or replaced an old page with a new one, I&#8217;d normally use a permanent redirect instead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"301_vs_302_redirects\"><\/span>301 vs 302 redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The main difference between a <strong>301 and 302 redirect is whether the move is intended to be permanent or temporary<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A 301 communicates that the original URL has permanently moved. A 302 communicates that the change is temporary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For normal <code>GET<\/code> requests, that&#8217;s generally the distinction most SEOs and website owners need to care about.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is another technical difference when redirects involve methods such as <code>POST<\/code>, however. With a 302, the subsequent request may be changed to <code>GET<\/code>. If preserving the original request method matters, that&#8217;s where a <strong>307 redirect<\/strong> becomes relevant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"303_redirects\"><\/span>303 redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_303_redirect\"><\/span>What is a 303 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>303 See Other<\/strong> redirect tells the client to request another URL using the <code>GET<\/code> method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This makes it different from simply saying that a page has temporarily or permanently moved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A common use is after a form or another <code>POST<\/code> request. Rather than allowing a refresh to potentially repeat the original submission, the server can return a 303 and send the user to a separate confirmation or results page using <code>GET<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For most SEO migrations and everyday URL changes, <strong>303 isn&#8217;t a redirect code I&#8217;m likely to use<\/strong>. It&#8217;s much more relevant to how web applications handle requests than mapping an old page to a new one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"307_redirects\"><\/span>307 redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_307_redirect\"><\/span>What is a 307 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>307 Temporary Redirect<\/strong> is a temporary redirect that preserves the original HTTP request method and body.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So if the original request was a <code>POST<\/code>, the redirected request remains a <code>POST<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s the important difference between a 307 and a 302: both represent temporary redirects, but a 307 explicitly preserves the request method.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"302_vs_307_redirects\"><\/span>302 vs 307 redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For a normal <code>GET<\/code> request, a 302 and 307 can appear to do essentially the same thing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The distinction becomes important with other request methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A 302 may result in the redirected request being changed to <code>GET<\/code>, whereas a <strong>307 guarantees that the method and request body are preserved<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So if the redirect is temporary <strong>and preserving the request method matters<\/strong>, I&#8217;d use a 307 rather than a 302.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"308_redirects\"><\/span>308 redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_308_redirect\"><\/span>What is a 308 redirect?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>308 Permanent Redirect<\/strong> is a permanent redirect that preserves the original HTTP request method and body.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In that sense, its relationship with a 301 is similar to the relationship between 307 and 302:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>301 and 308 are permanent.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>302 and 307 are temporary.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The additional distinction is that <strong>307 and 308 guarantee that the original request method and body are preserved<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"301_vs_308_redirects\"><\/span>301 vs 308 redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For typical SEO redirects involving normal page requests, both 301 and 308 communicate that the move is permanent, and Google recommends both as permanent server-side redirects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The technical difference is how the request method is handled. A 308 preserves the original method and body, removing the ambiguity that exists with a 301 for non-<code>GET<\/code> requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I first came across 308 redirects when <a href=\"https:\/\/daveashworth.co\/services-and-consultancy\/website-migrations-consultant\/\">carrying out a website migration<\/a> from <a href=\"https:\/\/daveashworth.co\/skills\/wordpress-seo-consultant\/\">a WordPress site<\/a> to the Contentful platform, which appeared to use 308 redirects by default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I hadn&#8217;t really encountered them during my normal SEO migration work before, so I asked <a href=\"https:\/\/twitter.com\/JohnMu\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/twitter.com\/JohnMu\" rel=\"noreferrer noopener\">John Mueller<\/a> whether there was any issue with using a 308 rather than a 301. He said it was fine to use either:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"603\" height=\"594\" src=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/06\/308_v_301_redirect.png\" alt=\"tweet\" class=\"wp-image-1275\" srcset=\"https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/06\/308_v_301_redirect.png 603w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/06\/308_v_301_redirect-300x296.png 300w, https:\/\/daveashworth.co\/blog\/wp-content\/uploads\/2023\/06\/308_v_301_redirect-150x148.png 150w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"301_redirect_examples\"><\/span>301 redirect examples<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are several ways to implement a 301 redirect depending on your server and hosting setup. Below are some common examples for <strong>Apache (.htaccess), NGINX and IIS<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Always test redirects after implementing them, particularly when using rules that can affect multiple URLs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_one_old_URL_to_a_new_URL\"><\/span>Redirect one old URL to a new URL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>htaccess<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Redirect 301 \/old-url\/ https:\/\/example.com\/new-url\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NGINX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>location = \/old-url\/ {\n    return 301 https:\/\/example.com\/new-url\/;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>IIS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration&gt;\n    &lt;system.webServer&gt;\n        &lt;httpRedirect enabled=\"true\" destination=\"https:\/\/example.com\/new-url\" httpResponseStatus=\"Permanent\" \/&gt;\n    &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_all_pages_to_the_homepage\"><\/span>Redirect all pages to the homepage<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There are situations where you may genuinely want every URL on a domain to redirect to the homepage &#8211; for example, if you&#8217;re retiring an old microsite or campaign domain and there are no equivalent pages on the destination site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wouldn&#8217;t normally use this approach for a website migration where the old pages have relevant replacements. In that situation, individual old URLs should be mapped to their closest equivalent wherever possible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s also worth remembering that redirecting lots of unrelated or removed URLs to the homepage isn&#8217;t a reliable way of preserving their SEO value. Google may treat redirects to an irrelevant destination as a <strong>soft 404<\/strong>, so this shouldn&#8217;t be used simply as a way of avoiding 404 responses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If redirecting the entire site to the homepage is genuinely the intended behaviour, however, you can do it as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Apache\/.htaccess<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteRule ^ https:\/\/example.com\/ &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NGINX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name example.com;\n    return 301 https:\/\/example.com\/;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">IIS<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration&gt;\n    &lt;system.webServer&gt;\n        &lt;httpRedirect enabled=\"true\" destination=\"https:\/\/example.com\" httpResponseStatus=\"Permanent\" \/&gt;\n    &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_an_old_domain_to_a_new_domain_while_preserving_URLs\"><\/span>Redirect an old domain to a new domain while preserving URLs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These examples preserve the URL path, so <code>\/example-page\/<\/code> on the old domain redirects to <code>\/example-page\/<\/code> on the new domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Apache\/.htaccess<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine on\nRewriteRule (.*) https:\/\/newdomain.com\/$1 &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NGINX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name old-domain.com;\n    return 301 https:\/\/newdomain.com$request_uri;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>IIS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration&gt;\n    &lt;system.webServer&gt;\n        &lt;rewrite&gt;\n            &lt;rules&gt;\n                &lt;rule name=\"Redirect old domain to new domain\" stopProcessing=\"true\"&gt;\n                    &lt;match url=\"(.*)\" \/&gt;\n                    &lt;action type=\"Redirect\"\n                            url=\"https:\/\/newdomain.com\/{R:1}\"\n                            redirectType=\"Permanent\" \/&gt;\n                &lt;\/rule&gt;\n            &lt;\/rules&gt;\n        &lt;\/rewrite&gt;\n    &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_www_to_non-www\"><\/span><br>Redirect www to non-www<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Apache\/.htaccess<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteCond %{HTTP_HOST} ^www\\.example\\.com$ &#91;NC]\nRewriteRule ^ https:\/\/example.com%{REQUEST_URI} &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NGINX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name www.example.com;\n    return 301 https:\/\/example.com$request_uri;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>IIS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration&gt;\n    &lt;system.webServer&gt;\n        &lt;rewrite&gt;\n            &lt;rules&gt;\n                &lt;rule name=\"Redirect to non-www\" stopProcessing=\"true\"&gt;\n                    &lt;match url=\".*\" \/&gt;\n                    &lt;conditions&gt;\n                        &lt;add input=\"{HTTP_HOST}\" pattern=\"^www.example.com$\" \/&gt;\n                    &lt;\/conditions&gt;\n                    &lt;action type=\"Redirect\" url=\"https:\/\/example.com\/{R:0}\" redirectType=\"Permanent\" \/&gt;\n                &lt;\/rule&gt;\n            &lt;\/rules&gt;\n        &lt;\/rewrite&gt;\n    &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_non-www_to_www\"><\/span>Redirect non-www to www<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Apache\/.htaccess<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteCond %{HTTP_HOST} ^example\\.com$ &#91;NC]\nRewriteRule ^ https:\/\/www.example.com%{REQUEST_URI} &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NGINX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name example.com;\n    return 301 https:\/\/www.example.com$request_uri;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>IIS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration&gt;\n    &lt;system.webServer&gt;\n        &lt;rewrite&gt;\n            &lt;rules&gt;\n                &lt;rule name=\"Redirect to www\" stopProcessing=\"true\"&gt;\n                    &lt;match url=\".*\" \/&gt;\n                    &lt;conditions&gt;\n                        &lt;add input=\"{HTTP_HOST}\" pattern=\"^example.com$\" \/&gt;\n                    &lt;\/conditions&gt;\n                    &lt;action type=\"Redirect\" url=\"https:\/\/www.example.com\/{R:0}\" redirectType=\"Permanent\" \/&gt;\n                &lt;\/rule&gt;\n            &lt;\/rules&gt;\n        &lt;\/rewrite&gt;\n    &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_HTTP_to_HTTPS\"><\/span>Redirect HTTP to HTTPS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Apache\/.htaccess<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NGINX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name example.com;\n    return 301 https:\/\/example.com$request_uri;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>IIS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration&gt;\n    &lt;system.webServer&gt;\n        &lt;rewrite&gt;\n            &lt;rules&gt;\n                &lt;rule name=\"Redirect to HTTPS\" stopProcessing=\"true\"&gt;\n                    &lt;match url=\"(.*)\" \/&gt;\n                    &lt;conditions&gt;\n                        &lt;add input=\"{HTTPS}\" pattern=\"off\" \/&gt;\n                    &lt;\/conditions&gt;\n                    &lt;action type=\"Redirect\" url=\"https:\/\/{HTTP_HOST}\/{R:1}\" redirectType=\"Permanent\" \/&gt;\n                &lt;\/rule&gt;\n            &lt;\/rules&gt;\n        &lt;\/rewrite&gt;\n    &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"301_redirect_generators\"><\/span>301 redirect generators<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re dealing with a large number of redirects, particularly during a website migration, writing every rule manually can become time-consuming and increases the chance of making mistakes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A 301 redirect generator can help turn a list of old and new URLs into redirect rules for a particular server configuration, such as Apache or NGINX.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wouldn&#8217;t implement generated rules without checking them first. For a large migration, I want to make sure the old and new URLs have been mapped correctly, that the syntax is appropriate for the server configuration, and that the redirects don&#8217;t introduce chains or loops.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.rapidtables.com\/web\/tools\/redirect-generator.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.rapidtables.com\/web\/tools\/redirect-generator.html<\/a><br><a href=\"https:\/\/www.pixelkicks.co.uk\/resources\/bulk-301-redirect-generator\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.pixelkicks.co.uk\/resources\/bulk-301-redirect-generator\/<\/a><br><a href=\"https:\/\/salt.agency\/tools\/bulk-redirect-generator\/\" target=\"_blank\" rel=\"noopener\">https:\/\/salt.agency\/tools\/bulk-redirect-generator\/<\/a><br><a href=\"https:\/\/www.aleydasolis.com\/herramientas-recursos-seo\/htaccess-redirects-generator\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.aleydasolis.com\/htaccess-redirects-generator\/page-to-page\/<\/a><br><a href=\"https:\/\/www.danielmorell.com\/tools\/htaccess\/redirect-generator\" target=\"_blank\" rel=\"noopener\">https:\/\/www.danielmorell.com\/tools\/htaccess\/redirect-generator<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Bulk_301_redirects\"><\/span>Bulk 301 redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For larger migrations, I normally start with a URL mapping rather than the redirect rules themselves. That gives me a list containing the old URL and its intended destination, which can then be converted into the required redirect format.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>https:\/\/oldsite.com\/page-a\/<\/code> \u2192 <code>https:\/\/newsite.com\/page-a\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>https:\/\/oldsite.com\/page-b\/<\/code> \u2192 <code>https:\/\/newsite.com\/new-page-b\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is particularly useful when hundreds or thousands of URLs need redirecting, because the important part isn&#8217;t simply generating hundreds of 301s &#8211; it&#8217;s making sure <strong>each old URL points to the right destination<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_check_a_301_redirect\"><\/span>How to check a 301 redirect<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve implemented a redirect, it&#8217;s worth checking that it&#8217;s returning the status code you expected and sending users and search engines directly to the correct destination.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For an individual URL, a redirect checker will normally show you the original URL, the HTTP status code returned and the destination URL. This also makes it easy to spot unexpected redirect chains.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.redirect-checker.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.redirect-checker.org\/<\/a><br><a href=\"https:\/\/www.whatsmydns.net\/redirect-checker\" target=\"_blank\" rel=\"noopener\">https:\/\/www.whatsmydns.net\/redirect-checker<\/a><br><a href=\"https:\/\/www.serpworx.com\/check-301-redirects\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.serpworx.com\/check-301-redirects\/<\/a><br><a href=\"https:\/\/wheregoes.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/wheregoes.com\/<\/a><br><a href=\"https:\/\/smallseotools.com\/redirect-checker\/\" target=\"_blank\" rel=\"noopener\">https:\/\/smallseotools.com\/redirect-checker\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_check_if_a_301_redirect_is_working\"><\/span>How to check if a 301 redirect is working<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the old URL into a redirect checker and check that it returns a <strong>301 status code<\/strong> followed by the intended destination URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ideally, you want to see something as simple as:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Old URL \u2192 301 \u2192 Final URL<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Old URL \u2192 301 \u2192 URL B \u2192 301 \u2192 Final URL<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second example is a <strong>redirect chain<\/strong>. It may still get users to the right place, but I&#8217;d normally update the original redirect so it points directly to the final URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_check_301_redirects_in_bulk\"><\/span>How to check 301 redirects in bulk<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Checking redirects individually is fine when you&#8217;ve only changed a handful of URLs. During a website migration, however, I normally want to test the entire redirect mapping in bulk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A crawler such as Screaming Frog can be used to upload or crawl a list of old URLs and check their response codes, redirect destinations and any redirect chains.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a migration, I&#8217;d check that the important old URLs return the expected <strong>301<\/strong>, resolve to the correct final destination and don&#8217;t unexpectedly end in a <strong>404<\/strong>, redirect loop or unrelated page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"301_redirect_best_practices\"><\/span>301 redirect best practices<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_to_the_most_relevant_destination\"><\/span>Redirect to the most relevant destination<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A redirect should take users and search engines to the closest equivalent of the original page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>\/old-product\/<\/code> has been replaced by <code>\/new-product\/<\/code>, redirecting directly between those URLs makes sense. Sending it to the homepage simply because the original page no longer exists usually doesn&#8217;t.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is particularly important during website migrations, where accurate URL mapping can make the difference between preserving useful signals and effectively removing pages from the site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_directly_to_the_final_URL\"><\/span>Redirect directly to the final URL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid creating unnecessary redirect chains such as:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A \u2192 301 \u2192 URL B \u2192 301 \u2192 URL C<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Where possible, update the original redirect so it goes directly to the final destination:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A \u2192 301 \u2192 URL C<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This reduces unnecessary requests and makes the redirect relationship clearer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dont_redirect_everything_just_to_avoid_404s\"><\/span>Don&#8217;t redirect everything just to avoid 404s<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not every deleted URL needs a redirect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a page has been removed and there isn&#8217;t a relevant replacement, allowing it to return a <strong>404 or 410<\/strong> can be more appropriate than redirecting it to an unrelated page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I generally add a redirect when there&#8217;s a genuine replacement or another page that satisfies substantially the same intent.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Avoid_redirect_loops\"><\/span>Avoid redirect loops<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A redirect loop occurs when URLs continually redirect between one another, for example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A \u2192 URL B \u2192 URL A<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Users and search engines can&#8217;t reach a final destination, so redirect loops should be treated as errors and fixed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Update_internal_links_where_possible\"><\/span>Update internal links where possible<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Even if a 301 is working correctly, I prefer to update internal links so they point directly to the final URL rather than relying on the redirect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, don&#8217;t leave:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Internal link \u2192 old URL \u2192 301 \u2192 new URL<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">when you can change it to:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Internal link \u2192 new URL<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The redirect can remain in place for external links, bookmarks and previously indexed URLs, but your own website shouldn&#8217;t need to use it unnecessarily.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Keep_redirects_in_place_after_a_migration\"><\/span>Keep redirects in place after a migration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I wouldn&#8217;t remove migration redirects as soon as Google has discovered the new URLs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Old URLs can continue receiving traffic through backlinks, bookmarks, old emails and other sources long after a migration has taken place.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For important migrated URLs, I generally treat the redirects as part of the site&#8217;s ongoing configuration rather than something to remove after a few weeks or months.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_redirect_problems_and_how_to_fix_them\"><\/span>Common redirect problems and how to fix them<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_chains\"><\/span>Redirect chains<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A redirect chain occurs when a URL redirects through one or more additional URLs before reaching its final destination.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A \u2192 301 \u2192 URL B \u2192 301 \u2192 URL C<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These often appear over time as URLs are changed more than once. An old redirect might originally have pointed to URL B, but when URL B is later changed to URL C, nobody updates the original rule.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_fix_redirect_chains\"><\/span>How to fix redirect chains<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Where possible, update the redirects so every old URL points directly to the final destination:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A \u2192 301 \u2192 URL C<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL B \u2192 301 \u2192 URL C<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I normally look for redirect chains during crawls and when testing redirect mappings for a website migration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirect_loops\"><\/span>Redirect loops<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A redirect loop occurs when redirects send the browser or crawler back to a URL it has already visited.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>URL A \u2192 URL B \u2192 URL A<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also create more complicated loops involving several URLs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fix is to identify the conflicting redirect rules and make sure there&#8217;s a single final destination that doesn&#8217;t redirect back into the chain.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Redirects_to_404_pages\"><\/span>Redirects to 404 pages<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A redirect can return a perfectly valid <strong>301 status code<\/strong> and still be broken if its destination returns a 404.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Old URL \u2192 301 \u2192 New URL \u2192 404<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can happen when a destination page is subsequently deleted or its URL changes without the older redirect being updated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When checking redirects, I therefore don&#8217;t just check for the initial 301 &#8211; I check the <strong>final response and destination URL as well<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"HTTP_and_HTTPS_redirect_chains\"><\/span>HTTP and HTTPS redirect chains<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A common unnecessary chain is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>http:\/\/www.example.com\/<\/code><br>\u2192 <code>https:\/\/www.example.com\/<\/code><br>\u2192 <code>https:\/\/example.com\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Where possible, the redirect configuration can instead send the original URL directly to the canonical version:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>http:\/\/www.example.com\/<\/code><br>\u2192 <code>https:\/\/example.com\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is one reason I prefer the redirect examples earlier in this guide to point directly to HTTPS rather than preserving the original <code>$scheme<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"www_and_non-www_redirect_problems\"><\/span>www and non-www redirect problems<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Problems can occur when different redirect rules are responsible for HTTPS and hostname canonicalisation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, one rule may redirect <code>www<\/code> to non-<code>www<\/code>, while another incorrectly redirects the destination back to <code>www<\/code>, creating a loop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choose the hostname you want to use consistently and make sure your redirect rules all point in that direction.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Trailing_slash_redirects\"><\/span>Trailing slash redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trailing slash inconsistencies can also create unnecessary redirects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/example<\/code> \u2192 <code>\/example\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This isn&#8217;t necessarily a problem by itself. The issue is when inconsistent internal links or additional redirect rules create extra hops.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whichever URL format your site uses, I prefer internal links, canonicals and redirects to point directly to that version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Which_redirect_code_should_you_use\"><\/span>Which redirect code should you use?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For most SEO work, the choice of redirect comes down to whether the change is <strong>permanent or temporary<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a URL has permanently moved, I&#8217;ll normally use a <strong>301 redirect<\/strong>. A <strong>308<\/strong> is also a permanent redirect and is useful where the original request method and body need to be preserved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a temporary change, <strong>302<\/strong> is the common choice, while <strong>307<\/strong> guarantees that the original request method and body are preserved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>303<\/strong> has a different purpose and is primarily useful when you want a subsequent request to use <code>GET<\/code>, such as after a form submission.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whichever redirect code you&#8217;re using, the things I care about most from an SEO perspective are whether it accurately represents the change, points to the most relevant destination, avoids unnecessary chains or loops, and actually works when tested.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And if you&#8217;re carrying out a larger website migration, the redirect code itself is only part of the job. Mapping the old URLs to the right destinations and thoroughly testing those redirects is just as important.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re planning a larger move and need help with the redirect strategy, URL mapping or testing, I offer <a href=\"https:\/\/daveashworth.co\/services-and-consultancy\/website-migrations-consultant\/\">website migration consultancy<\/a>.<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n\t\"@context\": \"https:\/\/schema.org\",\n\t\"@type\": \"FAQPage\",\n\t\"mainEntity\": \n\t[\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What are 30x Redirect Codes?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"30x Redirect codes are a crucial component of website management and search engine optimization. These codes, such as the commonly used 301 and 302 redirects, serve the purpose of sending users and search engines to a different URL than the one they initially requested. When a redirect code is implemented correctly, it ensures that visitors are seamlessly directed to the new location, preserving their user experience and preventing broken links. Moreover, redirect codes also play a significant role in preserving the website's search engine rankings by transferring the link equity and authority from the old URL to the new one. This allows websites to maintain their visibility and avoid potential penalties from search engines. In summary, redirect codes in English are essential tools for website administrators and SEO specialists to ensure smooth navigation, preserve search engine rankings, and enhance overall user experience.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"Why are 30x redirect codes important?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"<p>30x redirect codes are important for several reasons, including:<\/p><ul><li>Maintaining SEO ranking power<\/li><li>Resolving duplication issues<\/li><li>Removing or changing pages<\/li><li>Avoiding redirect chains<\/li><li>Maintaining backlinks<\/li><li>Improving user experience<\/li><\/ul>\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What Are The Different Types of 30x Redirect Codes?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"The 4 main type of 30x redirects are 301, 302, 307 and 308.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is a 301 redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 301 redirect is a type of HTTP status code that indicates a permanent redirection of a web page from one URL to another. The \u201c301\u201d refers to the status code that is sent to the browser by the server, which tells the browser that the page has been permanently moved to a new location. When a user or search engine crawls a web page that has been redirected with a 301 status code, they are automatically redirected to the new URL.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"When to use a 301 redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"<p>301 redirects should be used when you want to permanently redirect a web page to a new URL. This can be useful in a number of situations, such as when you are:<\/p><ul><li>Migrating your website to a new domain<\/li><li>Changing the URL structure of your website<\/li><li>Consolidating multiple pages into one<\/li><li>Removing or renaming a page on your website<\/li><\/ul>\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is a 302 Redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 302 redirect is a temporary redirect status code that indicates that the requested resource has been moved temporarily to a new URL. When a user visits a web page that has a 302 redirect, the browser is automatically redirected to the new URL specified in the Location header of the server\u2019s response.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"When to Use a 302 Redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 302 redirect is useful when you want to temporarily redirect users to a different URL while preserving the original URL. For example, if you are redesigning your website and want to temporarily redirect users to a new URL while you work on the new site, a 302 redirect is a good option.  Another use case for a 302 redirect is when you want to test a new page or website. By using a 302 redirect, you can test the new page or website without affecting the SEO of your existing site.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"302 v 301 Redirect\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"The main difference between a 302 redirect and a 301 redirect is that a 301 redirect is a permanent redirect, while a 302 redirect is a temporary redirect.  When you use a 301 redirect, search engines will update their links to the new URL and transfer the link juice to the new URL. However, when you use a 302 redirect, search engines will not update their links to the new URL, and the link juice will not be passed to the new URL.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is a 307 Redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 307 Temporary Redirect indicates that the requested resource has been temporarily moved to a new URL. Unlike other redirect types, such as 301 or 302, a 307 redirect instructs the browser to make the same request to the new URL as the original request method, including any submitted data.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"When to Use a 307 Redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 307 redirect should be used when you need to temporarily move a resource to a new URL, but you want to preserve the original request method and any submitted data. This is useful in situations where the resource is temporarily unavailable at the original URL, but will be returning soon.  For example, if you are performing maintenance on a website and need to temporarily redirect visitors to a maintenance page, you could use a 307 redirect. This would allow visitors to submit a form or perform other actions on the maintenance page, and then be redirected back to the original page once maintenance is complete.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"307 v 301 Redirect\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"The main difference between a 307 redirect and a 301 redirect is that a 301 redirect is a permanent redirect, while a 307 redirect is a temporary redirect. A 301 redirect tells search engines that the original URL has been permanently replaced with the new URL, and that they should update their index accordingly. In contrast, a 307 redirect tells search engines that the original URL is only temporarily unavailable, and that they should continue to index it.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"What is a 308 Redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 308 Permanent Redirect is a Hypertext Transfer Protocol (HTTP) status code that indicates that the requested resource has been permanently moved to a new URL. When a server sends a 308 code, it also includes a Location header that specifies the new URL to which the client should redirect.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"When to Use a 308 Redirect?\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"A 308 redirect is useful when you want to redirect users to a new URL permanently. This can be done when you have changed the URL of a page and want to redirect users to the new location. It is also useful when you want to redirect users to a new URL that has the same content as the old URL, but with a different domain name or protocol.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"308 v 301 Redirect\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"The main difference between HTTP 301 and 308 status codes is that 308 is a more strict permanent redirect that requires all clients to follow the redirect and repeat the exact same request on the new location, while 301 is intended for use with clients that can update their own caches and indexes to reflect the new location of the resource and may change a POST request into a GET request in the case of a redirect.\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"Best Practices for 30x Redirects\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"<ul><li>Use 301 redirects<\/li><li>Avoid redirect loops<\/li><li>Keep your redirects up to date<\/li><li>Redirect to relevant pages<\/li><li>Use clear and concise URLs<\/li><li>Test your redirects<\/li><\/ul>\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@type\": \"Question\",\n\t\t\t\"name\": \"Common Issues with 301 Redirects\",\n\t\t\t\"acceptedAnswer\": \n\t\t\t{\n\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\"text\": \"<ul><li>Redirect Loops<\/li><li>404 Errors<\/li><li>Redirect Chains<\/li><li>Non-WWW to WWW URLs<\/li><li>Trailing Slashes<\/li><\/ul>\"\n\t\t\t}\n\t\t}\n\t]\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>If you are a website owner, SEO or developer, you will have heard of 30x redirects. But what exactly are they and why are they important? <\/p>\n","protected":false},"author":1,"featured_media":1270,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[],"class_list":["post-1266","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-crawl-rate","category-migrations"],"_links":{"self":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts\/1266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/comments?post=1266"}],"version-history":[{"count":4,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts\/1266\/revisions"}],"predecessor-version":[{"id":2444,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/posts\/1266\/revisions\/2444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/media\/1270"}],"wp:attachment":[{"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/media?parent=1266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/categories?post=1266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daveashworth.co\/blog\/wp-json\/wp\/v2\/tags?post=1266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}