{"id":2785,"date":"2026-11-02T06:30:19","date_gmt":"2026-11-02T06:30:19","guid":{"rendered":"https:\/\/rankingbite.com\/blog\/?p=2785"},"modified":"2026-11-21T11:45:38","modified_gmt":"2026-11-21T11:45:38","slug":"301-vs-302-redirect","status":"publish","type":"post","link":"https:\/\/rankingbite.com\/blog\/301-vs-302-redirect\/","title":{"rendered":"301 vs. 302 Redirects: Which to Use and Why"},"content":{"rendered":"<p><span style=\"font-weight: 400\">The difference between a 301 and a 302 redirect is permanence. A 301 redirect tells browsers and search engines that a URL has <\/span><b>moved permanently, so the new URL replaces the old one in search results<\/b><span style=\"font-weight: 400\">. A 302 redirect signals a <\/span><b>temporary move, so the original URL stays indexed<\/b><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Choosing the wrong status code sends search engines a mixed signal about which URL to rank. This guide explains what each redirect does, how Google treats them, and which one fits 10 common situations.<\/span><\/p>\n<h2><b>What Is a 301 Redirect?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">A 301 redirect is <\/span><b>an HTTP status code (301 Moved Permanently) that sends users and search engines from an old URL to a new URL for good<\/b><span style=\"font-weight: 400\">. Google treats a 301 as a strong signal that the new URL is canonical, so the new URL replaces the old one in search results.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The server returns the 301 status with a <\/span><span style=\"font-weight: 400\">Location<\/span><span style=\"font-weight: 400\"> header that holds the new address. The browser then requests that new address automatically. The visitor sees only the final page.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A 301 redirect has 4 defining attributes:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><b>Status text:<\/b><span style=\"font-weight: 400\"> &#8220;Moved Permanently,&#8221; defined in<\/span><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc9110#name-301-moved-permanently\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">RFC 9110<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Search result shown:<\/b><span style=\"font-weight: 400\"> the redirect target (new URL), per<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/301-redirects\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Google Search Central<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Browser caching:<\/b><span style=\"font-weight: 400\"> browsers cache a 301 by default, so repeat visitors skip the old URL entirely.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Typical lifespan:<\/b><span style=\"font-weight: 400\"> permanent. Google recommends permanent redirects only when the redirect will not be reverted.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Common 301 redirect examples include moving <\/span><span style=\"font-weight: 400\">http:\/\/<\/span><span style=\"font-weight: 400\"> pages to <\/span><span style=\"font-weight: 400\">https:\/\/<\/span><span style=\"font-weight: 400\">, changing <\/span><span style=\"font-weight: 400\">example.com\/blog\/seo-tips<\/span><span style=\"font-weight: 400\"> to <\/span><span style=\"font-weight: 400\">example.com\/seo-tips<\/span><span style=\"font-weight: 400\">, and merging two domains after an acquisition.<\/span><\/p>\n<h2><b>What Is a 302 Redirect?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">A 302 redirect is <\/span><b>an HTTP status code (302 Found) that sends visitors to a different URL for a limited time while the original URL keeps its place in search results<\/b><span style=\"font-weight: 400\">. Google treats a 302 as a weak canonical signal, so the source page usually stays indexed.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The 302 response also carries a <\/span><span style=\"font-weight: 400\">Location<\/span><span style=\"font-weight: 400\"> header. Browsers follow it the same way they follow a 301. The difference lies in caching and indexing: browsers do not cache a 302 by default, and search engines keep checking the original URL.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A 302 redirect has 4 defining attributes:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><b>Status text:<\/b><span style=\"font-weight: 400\"> &#8220;Found&#8221; in HTTP\/1.1. HTTP\/1.0 called it &#8220;Moved Temporarily.&#8221;<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Search result shown:<\/b><span style=\"font-weight: 400\"> the redirect source (original URL), per<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/301-redirects\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Google Search Central<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Request method:<\/b><span style=\"font-weight: 400\"> browsers often switch a POST request to GET after a 302.<\/span><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status\/302\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">MDN<\/span><\/a><span style=\"font-weight: 400\"> recommends a 307 when the method must stay the same.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Typical lifespan:<\/b><span style=\"font-weight: 400\"> days to a few weeks, tied to a known end date.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Common 302 redirect examples include sending an out-of-stock product page to a category page, routing users to a maintenance page during a server upgrade, and sending a share of traffic to a test page during an A\/B test.<\/span><\/p>\n<h2><b>What Is the Difference Between a 301 and a 302 Redirect?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">The 301 vs. 302 difference comes down to <\/span><b>which URL Google indexes: a 301 makes the new URL canonical, while a 302 keeps the old URL in search results<\/b><span style=\"font-weight: 400\">. Both redirects send the visitor to the same destination, and both pass PageRank. Caching and canonical signals differ.<\/span><\/p>\n<div class=\"su-table su-table-responsive su-table-alternate\">\n<div style=\"width: 100%\">\n<table style=\"width: 100%;border-collapse: collapse;font-family: Arial, sans-serif;font-size: 14px;line-height: 1.5;color: #222\">\n<thead>\n<tr style=\"background-color: #172b4d;color: #fff\">\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Attribute<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">301 Redirect<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">302 Redirect<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Status text<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Moved Permanently<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Found<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Meaning<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">URL moved for good<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">URL moved for now<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">URL shown in Google<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">New URL (target)<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Old URL (source)<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Canonical signal<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Strong<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Weak<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">PageRank passed<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Yes<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Yes<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Browser caching<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Cached by default<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Not cached by default<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Best for<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Migrations, HTTPS, merged pages<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Maintenance, A\/B tests, promotions<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Method-preserving version<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">308<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">307<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2786 size-large\" src=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-redirect-comparison-1024x520.png\" alt=\"ide-by-side comparison: a 301 redirect makes Google show the new URL in search results, while a 302 redirect keeps the old URL in search results\" width=\"1024\" height=\"520\" srcset=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-redirect-comparison-1024x520.png 1024w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-redirect-comparison-300x152.png 300w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-redirect-comparison-768x390.png 768w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-redirect-comparison.png 1425w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2><b>How Do 301 and 302 Redirects Affect SEO?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">301 redirect SEO value comes from consolidation: <\/span><b>a 301 moves rankings, backlinks, and indexing to the new URL, while a 302 keeps them attached to the old URL<\/b><span style=\"font-weight: 400\">. Neither redirect loses PageRank. The SEO risk comes from picking the code that signals the wrong canonical.<\/span><\/p>\n<h3><b>Do 301 and 302 Redirects Pass PageRank?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Both redirect types pass full PageRank. Google&#8217;s Gary Illyes confirmed on July 26, 2016, that 30x redirects no longer lose PageRank, as<\/span><a href=\"https:\/\/searchengineland.com\/google-no-pagerank-dilution-using-301-302-30x-redirects-anymore-254608\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Search Engine Land reported<\/span><\/a><span style=\"font-weight: 400\">. The older belief that a 301 costs 15% of link value dates from before that change.<\/span><\/p>\n<h3><b>Which URL Does Google Index After a Redirect?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Google indexes the redirect target after a 301 and the redirect source after a 302.<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/http-network-errors\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Google&#8217;s HTTP status code guide<\/span><\/a><span style=\"font-weight: 400\"> calls a 301 a strong canonical signal and a 302 a weak one. Other signals, such as internal links and <\/span><span style=\"font-weight: 400\">rel=&#8221;canonical&#8221;<\/span><span style=\"font-weight: 400\"> tags, still influence the final choice.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Google stores the other URL as an alternate name of the canonical. After a domain move, old URLs appear in results occasionally until users adopt the new domain.<\/span><\/p>\n<h3><b>What Happens When a 302 Stays in Place for Months?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">A long-running 302 sends a mixed signal. Google keeps the old URL indexed while users land on the new one, so the new page builds rankings slowly. Google sometimes reinterprets a long-lived 302 as a 301, but that heuristic is not guaranteed. Check the redirected URL in the Search Console URL Inspection tool to see which URL Google treats as canonical.<\/span><\/p>\n<h2><b>When Should You Use a 301 vs. a 302 Redirect?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">Use a 301 redirect <\/span><b>when the old URL will never return and<\/b><span style=\"font-weight: 400\"> a 302 redirect <\/span><b>when the original URL comes back on a known date<\/b><span style=\"font-weight: 400\">. Google advises permanent redirects only when you are sure the redirect will not be reverted. When the move is permanent but you are unsure, a 301 is the safer default.<\/span><\/p>\n<div class=\"su-table su-table-responsive su-table-alternate\">\n<div style=\"width: 100%\">\n<table style=\"width: 100%;border-collapse: collapse;font-family: Arial, sans-serif;font-size: 14px;line-height: 1.6;color: #222\">\n<thead>\n<tr style=\"background-color: #172b4d;color: #fff\">\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Situation<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Redirect<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Reason<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Domain change (oldbrand.com \u2192 newbrand.com)<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">301<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">New domain must replace old URLs in results<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">HTTP to HTTPS migration<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">301<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">HTTPS version is the permanent canonical<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">www to non-www (or the reverse)<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">301<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">One preferred hostname consolidates signals<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">URL slug change (\/blog\/seo-tips-2024 \u2192 \/seo-tips)<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">301<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Old slug is retired<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Two articles merged into one<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">301<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Combined page inherits backlinks<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Deleted product with a direct replacement<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">301<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Replacement page serves the same intent<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Product temporarily out of stock<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">302<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Original page returns when stock arrives<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Site maintenance or server upgrade<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">302<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Original pages resume after the work<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">A\/B test of a landing page<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">302<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Original URL stays canonical during the test<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Seasonal promotion (\/sale \u2192 \/diwali-sale)<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">302<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Campaign page expires after the season<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><span style=\"font-weight: 400\">Google&#8217;s<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/website-testing\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">A\/B testing guidance<\/span><\/a><span style=\"font-weight: 400\"> specifically recommends a 302 for test variants. A 301 there would make the test page canonical.<\/span><\/p>\n<h3><b>How Do You Decide Between a 301 and a 302 in 3 Questions?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">The choice between a 301 and a 302 comes down to <\/span><b>whether the old URL will ever serve its original content again<\/b><span style=\"font-weight: 400\">. Answer these 3 questions in order and stop at the first &#8220;yes&#8221;:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><b>Will the original URL return on a known date?<\/b><span style=\"font-weight: 400\"> Use a 302. Examples: a sale page, maintenance, and an out-of-stock product.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Is the redirect part of a test?<\/b><span style=\"font-weight: 400\"> Use a 302, so the original URL stays canonical during the A\/B test.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Is the old URL retired for good?<\/b><span style=\"font-weight: 400\"> Use a 301. Examples: a new domain, HTTPS, a changed slug, and merged articles.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">When none of the answers is clear, pick the 301 for any move you do not plan to undo within a few months. A 302 that stays live with no end date is the costlier mistake, because Google keeps ranking the old URL.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2787 size-large\" src=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-decision-flowchart-1024x469.png\" alt=\"Flowchart with 3 questions for choosing a redirect: a URL returning on a known date or an A\/B test gets a 302, a retired URL gets a 301, and an unsure case defaults to a 301\" width=\"1024\" height=\"469\" srcset=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-decision-flowchart-1024x469.png 1024w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-decision-flowchart-300x137.png 300w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-decision-flowchart-768x352.png 768w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/301-vs-302-decision-flowchart.png 1425w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2><b>How Do 307, 308, and Meta Refresh Redirects Compare?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">Google groups every redirect method as <\/span><b>either permanent (like a 301) or temporary (like a 302)<\/b><span style=\"font-weight: 400\">. A 308 behaves like a 301, a 307 behaves like a 302, and meta refresh depends on its delay. Server-side status codes are the most reliable option for SEO.<\/span><\/p>\n<div class=\"su-table su-table-responsive su-table-alternate\">\n<div style=\"width: 100%\">\n<table style=\"width: 100%;border-collapse: collapse;font-family: Arial, sans-serif;font-size: 14px;line-height: 1.6;color: #222\">\n<thead>\n<tr style=\"background-color: #172b4d;color: #fff\">\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Method<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Type in Google<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Key detail<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">308 Permanent Redirect<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Permanent<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Keeps the request method (POST stays POST)<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">307 Temporary Redirect<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Temporary<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Keeps the request method; browsers also use it internally for HSTS upgrades<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">303 See Other<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Temporary<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Forces a GET request, used after form submissions<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Meta refresh, 0 seconds<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Permanent<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Runs in the HTML <code>&lt;head&gt;<\/code> when server access is unavailable<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Meta refresh, 1+ seconds<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Temporary<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Delayed redirect, weaker for users and SEO<\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">JavaScript <code>window.location<\/code><\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Permanent<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Google sees it only when rendering succeeds<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><span style=\"font-weight: 400\">Source:<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/301-redirects\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Redirects and Google Search<\/span><\/a><span style=\"font-weight: 400\">. For a standard page move, a 301 remains the most widely supported choice. A 308 matters mainly for APIs and form endpoints that must preserve POST data.<\/span><\/p>\n<h2><b>How Do You Set Up a 301 or 302 Redirect?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">A 301 or 302 redirect is set up <\/span><b>on the server, through the <\/b><b>.htaccess<\/b><b> file on Apache, the server block on Nginx, or a header in PHP<\/b><span style=\"font-weight: 400\">. The only change between the two is the status code. The examples below follow<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/301-redirects\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Google&#8217;s redirect documentation<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<h3><b>Apache (.htaccess)<\/b><\/h3>\n<p><span style=\"font-weight: 400\"># Permanent (301)<\/span><\/p>\n<p><span style=\"font-weight: 400\">Redirect permanent &#8220;\/old-page&#8221; &#8220;https:\/\/example.com\/new-page&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400\"># Temporary (302)<\/span><\/p>\n<p><span style=\"font-weight: 400\">Redirect temp &#8220;\/sale&#8221; &#8220;https:\/\/example.com\/diwali-sale&#8221;<\/span><\/p>\n<h3><b>Nginx<\/b><\/h3>\n<p><span style=\"font-weight: 400\">location = \/old-page {<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0return 301 https:\/\/example.com\/new-page;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">location = \/sale {<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0return 302 https:\/\/example.com\/diwali-sale;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h3><b>PHP<\/b><\/h3>\n<p><span style=\"font-weight: 400\">header(&#8216;HTTP\/1.1 301 Moved Permanently&#8217;);<\/span><\/p>\n<p><span style=\"font-weight: 400\">header(&#8216;Location: https:\/\/example.com\/new-page&#8217;);<\/span><\/p>\n<p><span style=\"font-weight: 400\">exit();<\/span><\/p>\n<p><span style=\"font-weight: 400\">Replace the first line with <\/span><span style=\"font-weight: 400\">header(&#8216;HTTP\/1.1 302 Found&#8217;);<\/span><span style=\"font-weight: 400\"> for a temporary redirect. Send the headers before any page output.<\/span><\/p>\n<h3><b>WordPress<\/b><\/h3>\n<p><span style=\"font-weight: 400\">WordPress users add redirects through a plugin instead of editing server files. Common options include Redirection, Rank Math (Redirections module), and Yoast SEO Premium (Redirect manager). Each plugin lets you pick 301 or 302 from a dropdown for every rule.<\/span><\/p>\n<h3><b>How to Verify the Redirect<\/b><\/h3>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Run <\/span><span style=\"font-weight: 400\">curl -I https:\/\/example.com\/old-page<\/span><span style=\"font-weight: 400\"> in a terminal.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Confirm the first line shows <\/span><span style=\"font-weight: 400\">301 Moved Permanently<\/span><span style=\"font-weight: 400\"> or <\/span><span style=\"font-weight: 400\">302 Found<\/span><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Confirm the <\/span><span style=\"font-weight: 400\">Location<\/span><span style=\"font-weight: 400\"> header shows the intended target.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Inspect the old URL in Google Search Console after Google recrawls it.<\/span><\/li>\n<\/ol>\n<h2><b>How Do You Fix a 302 Redirect That Should Be a 301?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">To fix a 302 that should be a 301, <\/span><b>find the rule that sends the 302, change its status code to 301, and confirm the change with curl<\/b><span style=\"font-weight: 400\">. Google applies the new canonical signal the next time it recrawls the old URL.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><b>Find the wrong redirects.<\/b><span style=\"font-weight: 400\"> Run <\/span><span style=\"font-weight: 400\">curl -I<\/span><span style=\"font-weight: 400\"> on the old URL, or crawl the site with Screaming Frog SEO Spider and filter for 302 responses.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Locate the rule.<\/b><span style=\"font-weight: 400\"> Check <\/span><span style=\"font-weight: 400\">.&lt;htaccess&gt;,<\/span><span style=\"font-weight: 400\">\u00a0the Nginx config, the redirect plugin, Cloudflare Redirect Rules, and application code. A CDN rule can override the server rule.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Change the code.<\/b><span style=\"font-weight: 400\"> Use the fix for your platform from the table below.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Retest.<\/b> <span style=\"font-weight: 400\">curl -I<\/span><span style=\"font-weight: 400\"> should now show <\/span><span style=\"font-weight: 400\">301 Moved Permanently<\/span><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Ask Google to recrawl.<\/b><span style=\"font-weight: 400\"> Inspect the old URL in Search Console and request indexing for the new URL.<\/span><\/li>\n<\/ol>\n<div class=\"su-table su-table-responsive su-table-alternate\">\n<div style=\"width: 100%\">\n<table style=\"width: 100%;border-collapse: collapse;font-family: Arial, sans-serif;font-size: 14px;line-height: 1.6;color: #222\">\n<thead>\n<tr style=\"background-color: #172b4d;color: #fff\">\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Platform<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Sends a 302 when<\/th>\n<th style=\"padding: 12px;border: 1px solid #d9dee7;text-align: left\">Change to<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Apache<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\"><code>Redirect \/old \/new<\/code> or <code>[R]<\/code> flag<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\"><code>Redirect 301 \/old \/new<\/code> or <code>[R=301,L]<\/code><\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Nginx<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\"><code>return 302<\/code> or <code>rewrite \u2026 redirect<\/code><\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\"><code>return 301<\/code> or <code>rewrite \u2026 permanent<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">PHP<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\"><code>header('Location: \u2026')<\/code> alone<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\"><code>header('Location: \u2026', true, 301)<\/code><\/td>\n<\/tr>\n<tr style=\"background-color: #f7f9fc\">\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">WordPress plugin<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Rule saved as 302<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Edit the rule and pick 301<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Cloudflare<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Status code set to 302<\/td>\n<td style=\"padding: 12px;border: 1px solid #d9dee7\">Edit the Redirect Rule, set 301, redeploy<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2788 size-large aligncenter\" src=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/fix-302-to-301-curl-check-1024x421.png\" alt=\"Terminal showing curl output before the fix with HTTP 302 Found and after the fix with HTTP 301 Moved Permanently\" width=\"1024\" height=\"421\" srcset=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/fix-302-to-301-curl-check-1024x421.png 1024w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/fix-302-to-301-curl-check-300x123.png 300w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/fix-302-to-301-curl-check-768x316.png 768w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/fix-302-to-301-curl-check.png 1308w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2><b>What Are the Most Common Redirect Mistakes?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">The most common redirect mistake is <\/span><b>using a 302 for a permanent move, which keeps the old URL indexed and delays the new page&#8217;s rankings<\/b><span style=\"font-weight: 400\">. Chains, loops, and irrelevant targets cause the next-largest share of redirect problems.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><b>302 for a permanent change.<\/b><span style=\"font-weight: 400\"> PHP&#8217;s plain Location header and Apache&#8217;s Redirect directives without a status default to 302. Check the status code after every migration.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Redirect chains.<\/b><span style=\"font-weight: 400\"> URL A \u2192 B \u2192 C wastes crawl time. Googlebot follows up to 10 hops and reports a redirect error after that, per<\/span><a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/http-network-errors\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Google&#8217;s status code guide<\/span><\/a><span style=\"font-weight: 400\">. Point every old URL straight to the final URL.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Redirect loops.<\/b><span style=\"font-weight: 400\"> URL A \u2192 B \u2192 A never resolves. Browsers show an &#8220;ERR_TOO_MANY_REDIRECTS&#8221; error.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Redirecting everything to the homepage.<\/b><span style=\"font-weight: 400\"> Google treats irrelevant redirects of deleted pages as soft 404s. Redirect to the closest matching page, or return a 404\/410.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Stale internal links.<\/b><span style=\"font-weight: 400\"> Internal links still pointing at old URLs force an extra hop. Update menus, sitemaps, and in-content links to the new URLs.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Removing redirects too early.<\/b><span style=\"font-weight: 400\"> Gary Illyes has advised keeping 301 redirects for at least 1 year, as<\/span><a href=\"https:\/\/www.searchenginejournal.com\/301-redirects\" target=\"_blank\" rel=\"noopener\"> <span style=\"font-weight: 400\">Search Engine Journal reports<\/span><\/a><span style=\"font-weight: 400\">. Backlinks to the old URL stop counting once its redirect disappears.<\/span><\/li>\n<\/ol>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2789 size-large\" src=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/redirect-chain-vs-single-hop-1024x387.png\" alt=\"Comparison of a three-hop redirect chain with a single 301 hop from the old URL to the final URL\" width=\"1024\" height=\"387\" srcset=\"https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/redirect-chain-vs-single-hop-1024x387.png 1024w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/redirect-chain-vs-single-hop-300x113.png 300w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/redirect-chain-vs-single-hop-768x290.png 768w, https:\/\/rankingbite.com\/blog\/wp-content\/uploads\/2026\/11\/redirect-chain-vs-single-hop.png 1425w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/h2>\n<h2><b>What Does &#8220;Page With Redirect&#8221; Mean in Google Search Console?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">&#8220;Page with redirect&#8221; in Search Console means <\/span><b>the listed URL redirects to another page, so Google indexes the target instead of the listed URL<\/b><span style=\"font-weight: 400\">. For a correct 301, this status is expected and needs no fix.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The status appears under <\/span><b>Indexing \u2192 Pages \u2192 Why pages aren&#8217;t indexed<\/b><span style=\"font-weight: 400\">. Check it in 3 cases:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><b>An important page appears in the list.<\/b><span style=\"font-weight: 400\"> The page redirects by mistake. Remove the redirect so the URL returns 200.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>The old URL still shows in search results weeks later.<\/b><span style=\"font-weight: 400\"> The redirect is probably a 302. Switch it to a 301 using the steps above.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>The redirect target is not indexed either.<\/b><span style=\"font-weight: 400\"> The target page has its own problem, such as a <\/span><span style=\"font-weight: 400\">noindex<\/span><span style=\"font-weight: 400\"> tag, a 404, or another redirect in a chain.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">Keep redirecting URLs out of the XML sitemap. A sitemap should list only final URLs that return 200.<\/span><\/p>\n<h2><b>FAQs About 301 vs. 302 Redirects<\/b><\/h2>\n<h3><b>Is a 301 or 302 redirect better for SEO?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Neither is better in every case. A 301 is correct for permanent moves because it transfers indexing to the new URL. A 302 is correct for temporary moves because it protects the original URL&#8217;s position. Both pass PageRank.<\/span><\/p>\n<h3><b>Can I change a 302 redirect to a 301 later?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Yes. Changing the status code on the server switches the signal immediately. Google applies the new canonical after it recrawls the URL, and the timing depends on how often Googlebot crawls that page.<\/span><\/p>\n<h3><b>Can a 301 redirect be undone?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">A 301 can be removed, but browsers that cached it keep redirecting returning visitors until their cache clears. Google also needs to recrawl the old URL. Use a 302 whenever reversal is likely.<\/span><\/p>\n<h3><b>How long should a 301 redirect stay in place?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Keep a 301 redirect for at least 1 year, and indefinitely for URLs with external backlinks. Removing it turns the old URL into a 404 and drops the value of links pointing to it.<\/span><\/p>\n<h3><b>Does a 302 redirect hurt SEO?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">A 302 does not hurt SEO when the move is temporary. It hurts only when used for a permanent change, because Google keeps ranking the old URL instead of the new one.<\/span><\/p>\n<h3><b>How do I check whether a URL uses a 301 or 302?<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Run <\/span><span style=\"font-weight: 400\">curl -I &lt;URL&gt;<\/span><span style=\"font-weight: 400\"> or use a browser&#8217;s Network tab (DevTools) and read the status code. Crawlers such as Screaming Frog SEO Spider list the redirect type for every URL on a site.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The difference between a 301 and a 302 redirect is permanence. A 301 redirect tells browsers and search engines that a URL has moved permanently, so the new URL replaces\u2026<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[179],"tags":[],"class_list":["post-2785","post","type-post","status-publish","format-standard","hentry","category-technical-seo"],"_links":{"self":[{"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/posts\/2785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/comments?post=2785"}],"version-history":[{"count":3,"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/posts\/2785\/revisions"}],"predecessor-version":[{"id":2792,"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/posts\/2785\/revisions\/2792"}],"wp:attachment":[{"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/media?parent=2785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/categories?post=2785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rankingbite.com\/blog\/wp-json\/wp\/v2\/tags?post=2785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}