{"id":144854,"date":"2020-09-08T01:00:00","date_gmt":"2020-09-08T06:00:00","guid":{"rendered":"https:\/\/ahrefs.com\/blog\/?p=144854"},"modified":"2023-10-04T09:13:59","modified_gmt":"2023-10-04T14:13:59","slug":"301-vs-302-redirects","status":"publish","type":"post","link":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/","title":{"rendered":"301 vs. 302 Redirects for SEO: Which Should You&nbsp;Use?"},"content":{"rendered":"\n<div class=\"intro-txt\">The difference between 301 and 302 redirects is that 301 redirects are for permanent moves and 302 redirects are for temporary moves.<\/div>\n\n\n\n<p>You need to use the right one to avoid SEO issues.<\/p>\n\n\n\n<p>Let\u2019s take a closer look at how these redirects work and when and how to use&nbsp;them.<\/p>\n\n\n\n<div class=\"intro-tok\" id=\"intro_tok\" style=\"display:none;\"><div class=\"intro-title\">Contents<\/div><a href=\"#\" class=\"expand-dots\"><span><\/span><span><\/span><span><\/span><\/a><\/div>\n\n\n\n<div class=\"post-nav-link clearfix\" id=\"section1\"><a class=\"subhead-anchor\" data-tip=\"tooltip__copielink\" rel=\"#section1\"><svg width=\"19\" height=\"19\" viewBox=\"0 0 14 14\" style><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M0 0h14v14H0z\" \/><path d=\"M7.45 9.887l-1.62 1.621c-.92.92-2.418.92-3.338 0a2.364 2.364 0 0 1 0-3.339l1.62-1.62-1.273-1.272-1.62 1.62a4.161 4.161 0 1 0 5.885 5.884l1.62-1.62L7.45 9.886zM5.527 5.135L7.17 3.492c.92-.92 2.418-.92 3.339 0 .92.92.92 2.418 0 3.339L8.866 8.473l1.272 1.273 1.644-1.643A4.161 4.161 0 1 0 5.897 2.22L4.254 3.863l1.272 1.272zm-.66 3.998a.749.749 0 0 1 0-1.06l2.208-2.206a.749.749 0 1 1 1.06 1.06L5.928 9.133a.75.75 0 0 1-1.061 0z\" style \/><\/g><\/svg><\/a><div class=\"link-text\" data-anchor=\"What is a 301 redirect?\" data-section=\"what-is-a-301-redirect\">\n\n\n\n<h2 class=\"wp-block-heading\">What is a 301 redirect?<\/h2>\n\n\n\n<\/div><\/div>\n\n\n\n<p>A 301 redirect is a permanent redirect. It takes visitors to the new URL and signals a permanent move to search engines.&nbsp;<\/p>\n\n\n\n<p>You should use a 301 redirect when&nbsp;you:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Permanently change the URL of a webpage.<\/li>\n\n\n\n<li>Permanently migrate to a new domain.<\/li>\n\n\n\n<li>Switch from <a href=\"https:\/\/ahrefs.com\/blog\/what-is-https\/\">HTTP to HTTPS<\/a>.<\/li>\n\n\n\n<li>Want to fix non-www\/www <a href=\"https:\/\/ahrefs.com\/blog\/duplicate-content\/\">duplicate content<\/a> issues.<\/li>\n\n\n\n<li>Permanently merge two or more pages or websites.<\/li>\n\n\n\n<li>Permanently change the URL structure of your website.<\/li>\n<\/ul>\n\n\n\n<div class=\"post-nav-link clearfix\" id=\"section1\"><a class=\"subhead-anchor\" data-tip=\"tooltip__copielink\" rel=\"#section1\"><svg width=\"19\" height=\"19\" viewBox=\"0 0 14 14\" style><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M0 0h14v14H0z\" \/><path d=\"M7.45 9.887l-1.62 1.621c-.92.92-2.418.92-3.338 0a2.364 2.364 0 0 1 0-3.339l1.62-1.62-1.273-1.272-1.62 1.62a4.161 4.161 0 1 0 5.885 5.884l1.62-1.62L7.45 9.886zM5.527 5.135L7.17 3.492c.92-.92 2.418-.92 3.339 0 .92.92.92 2.418 0 3.339L8.866 8.473l1.272 1.273 1.644-1.643A4.161 4.161 0 1 0 5.897 2.22L4.254 3.863l1.272 1.272zm-.66 3.998a.749.749 0 0 1 0-1.06l2.208-2.206a.749.749 0 1 1 1.06 1.06L5.928 9.133a.75.75 0 0 1-1.061 0z\" style \/><\/g><\/svg><\/a><div class=\"link-text\" data-anchor=\"What is a 302 redirect?\" data-section=\"what-is-a-302-redirect\">\n\n\n\n<h2 class=\"wp-block-heading\">What is a 302 redirect?&nbsp;<\/h2>\n\n\n\n<\/div><\/div>\n\n\n\n<p>A 302 redirect is a temporary redirect. It takes visitors to the new URL and signals a temporary move to search engines.&nbsp;<\/p>\n\n\n\n<p>You should use a 302 redirect when&nbsp;you:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Want to redirect users to the right version of the site for them (based on location\/language).<\/li>\n\n\n\n<li>Want to A\/B split-test the functionality or design of a webpage.<\/li>\n\n\n\n<li>Want to get feedback about a new page without affecting the old page\u2019s rankings.<\/li>\n\n\n\n<li>Run a promotion and want to redirect visitors to a sales page temporarily.<\/li>\n<\/ul>\n\n\n\n<p>In other words, whenever you plan to bring back the old page after a short period.&nbsp;<\/p>\n\n\n\n<div class=\"post-nav-link clearfix\" id=\"section1\"><a class=\"subhead-anchor\" data-tip=\"tooltip__copielink\" rel=\"#section1\"><svg width=\"19\" height=\"19\" viewBox=\"0 0 14 14\" style><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M0 0h14v14H0z\" \/><path d=\"M7.45 9.887l-1.62 1.621c-.92.92-2.418.92-3.338 0a2.364 2.364 0 0 1 0-3.339l1.62-1.62-1.273-1.272-1.62 1.62a4.161 4.161 0 1 0 5.885 5.884l1.62-1.62L7.45 9.886zM5.527 5.135L7.17 3.492c.92-.92 2.418-.92 3.339 0 .92.92.92 2.418 0 3.339L8.866 8.473l1.272 1.273 1.644-1.643A4.161 4.161 0 1 0 5.897 2.22L4.254 3.863l1.272 1.272zm-.66 3.998a.749.749 0 0 1 0-1.06l2.208-2.206a.749.749 0 1 1 1.06 1.06L5.928 9.133a.75.75 0 0 1-1.061 0z\" style \/><\/g><\/svg><\/a><div class=\"link-text\" data-anchor=\"How 301 and 302 redirects impact SEO?\" data-section=\"how-redirects-impact-seo\">\n\n\n\n<h2 class=\"wp-block-heading\">How do 301 and 302 redirects impact SEO?<\/h2>\n\n\n\n<\/div><\/div>\n\n\n\n<p>Redirects impact which page ranks in the search results and how well it ranks. This is because if you redirect one URL to another, Google only indexes and shows one of them in the search results. It also usually combines link signals from both URLs at the one it indexes.<\/p>\n\n\n\n<p>There\u2019s some nuance to how this works. Let\u2019s take a closer look.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How 301 redirects impact SEO<\/h3>\n\n\n\n<p>301 redirects tell Google that a page has moved forever, so it almost always indexes and shows the new URL in the search results. After all, there\u2019s no point keeping the old URL indexed if it\u2019s never coming back.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/1-google-indexes-new-urls-with-301-redirects.png\" alt=\"Google almost always indexes new URL when you use 301 redirect\" class=\"wp-image-144869\" style=\"width:540px;height:603px\" width=\"540\" height=\"603\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/1-google-indexes-new-urls-with-301-redirects.png 1800w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/1-google-indexes-new-urls-with-301-redirects-381x425.png 381w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/1-google-indexes-new-urls-with-301-redirects-768x858.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/1-google-indexes-new-urls-with-301-redirects-1376x1536.png 1376w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\"><\/figure>\n\n\n\n<div class=\"sidenote\"><div class=\"sidenote-title\">Sidenote.<\/div> Redirects are a <a href=\"https:\/\/ahrefs.com\/blog\/canonicalization\/\">canonicalization<\/a> signal, which is why they\u2019re not 100% effective. Google may, in very rare cases, treat a 301 redirect as a 302 redirect.<\/div>\n\n\n\n<p>Link signals also usually consolidate \u201cforward\u201d to the new&nbsp;URL.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/2-link-signals-consolidate-at-the-new-url-with-301-redirects.png\" alt=\"Links consolidate \u201cforward\u201d to the new URL when you use a 301 redirect\" class=\"wp-image-144870\" style=\"width:540px;height:548px\" width=\"540\" height=\"548\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/2-link-signals-consolidate-at-the-new-url-with-301-redirects.png 1800w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/2-link-signals-consolidate-at-the-new-url-with-301-redirects-418x425.png 418w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/2-link-signals-consolidate-at-the-new-url-with-301-redirects-768x780.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/2-link-signals-consolidate-at-the-new-url-with-301-redirects-1512x1536.png 1512w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\"><\/figure>\n\n\n\n<p>For example, say you redirect a page from site1.com\/x to site2.com\/x without changing the content. Link signals will consolidate at site2.com\/x. In other words, if site1.com\/x has 10 backlinks, site2.com\/x feels the benefit of them as if they point directly to&nbsp;it.&nbsp;<\/p>\n\n\n\n<p>It\u2019s only if a redirect is irrelevant that this doesn\u2019t happen because <a href=\"https:\/\/www.youtube.com\/watch?v=nIDZmac_rMI&amp;feature=youtu.be&amp;t=76&amp;ab_channel=GoogleWebmasters\">Google treats irrelevant redirects as soft 404s<\/a>.&nbsp;<\/p>\n\n\n\n<p>For example, say you redirect a blog post to your homepage. Google may not consolidate link signals because the two pages are entirely different.&nbsp;<\/p>\n\n\n\n<div class=\"recommendation\"><div class=\"recommendation-title\">Recommendation<\/div><div class=\"recommendation-content\">If you\u2019re curious how Google is treating a 301 redirect, check whether links are consolidating to the new URL in Google Search Console.&nbsp;\n\n\n\n<p>Here\u2019s how:&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open Google Search Console<\/li>\n\n\n\n<li>Go to <em>Links &gt; External Links &gt; Top linked pages&nbsp;<\/em><\/li>\n\n\n\n<li>Find the \u201cnew\u201d URL in the report and click it (use the \u201cTarget page\u201d filter to&nbsp;help)<\/li>\n\n\n\n<li>Filter the links by \u201cSite\u201d and paste in referring domains to the old page one by one (you can find these in the <strong>Referring Domains <\/strong>report in Ahrefs\u2019 <a href=\"https:\/\/ahrefs.com\/site-explorer\">Site Explorer<\/a>)&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>If you get no matches for several referring domains, Google is likely treating the redirect as a soft 404 and not counting the old page\u2019s backlinks toward the new&nbsp;URL.<\/p>\n\n\n\n<p>If there is a match, click on the site to see the actual links. If you see the old URL in the \u201cTarget URL\u201d column, Google is consolidating links at the new&nbsp;URL.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1864\" height=\"620\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/3-redirect-consolidation.png\" alt=\"Top linking pages report in GSC\" class=\"wp-image-144871\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/3-redirect-consolidation.png 1864w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/3-redirect-consolidation-680x226.png 680w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/3-redirect-consolidation-768x255.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/3-redirect-consolidation-1536x511.png 1536w\" sizes=\"auto, (max-width: 1864px) 100vw, 1864px\"><\/figure>\n\n\n\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">How 302 redirects impact SEO<\/h3>\n\n\n\n<p>302 redirects tell Google that a page has moved temporarily. So usually, it keeps the old URL indexed and shows it in the search results. After all, there\u2019s no point in removing the old URL and indexing the new URL if the old URL will be back&nbsp;soon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/4-google-indexes-old-urls-with-302-redirects.png\" alt=\"Google almost always indexes the old URL when you use a 302 redirect\" class=\"wp-image-144873\" style=\"width:540px;height:604px\" width=\"540\" height=\"604\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/4-google-indexes-old-urls-with-302-redirects.png 1800w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/4-google-indexes-old-urls-with-302-redirects-380x425.png 380w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/4-google-indexes-old-urls-with-302-redirects-768x858.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/4-google-indexes-old-urls-with-302-redirects-1374x1536.png 1374w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\"><\/figure>\n\n\n\n<p>Link signals also usually consolidate \u201cbackward\u201d to the old&nbsp;URL.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/5-link-signals-consolidate-at-the-old-url-with-302-redirects.png\" alt=\"Links consolidate &quot;backward&quot; to the new URL when you use a 302 redirect\" class=\"wp-image-144874\" style=\"width:540px;height:544px\" width=\"540\" height=\"544\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/5-link-signals-consolidate-at-the-old-url-with-302-redirects.png 1800w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/5-link-signals-consolidate-at-the-old-url-with-302-redirects-422x425.png 422w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/5-link-signals-consolidate-at-the-old-url-with-302-redirects-768x774.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/5-link-signals-consolidate-at-the-old-url-with-302-redirects-1525x1536.png 1525w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\"><\/figure>\n\n\n\n<p>Only if Google thinks you used a 302 redirect by mistake for a permanent move does this not happen. In that case, <a href=\"https:\/\/www.youtube.com\/watch?time_continue=1398&amp;v=opUfIzuzJSw&amp;feature=emb_title&amp;ab_channel=GoogleWebmasters%5C\">it treats the redirect as a 301<\/a>. This means it indexes the new URL instead and consolidates link signals there.&nbsp;<\/p>\n\n\n\n<p>Nobody knows how long a 302 redirect has to exist before Google starts treating it as a 301 redirect. Usually, it\u2019s a few weeks to a few months, but it can be days, weeks, or months.<\/p>\n\n\n\n<p>In some circumstances, Google even appears to treat 302s as 301s from the get-go.<\/p>\n\n\n\n<p>For example, our <a href=\"https:\/\/ahrefs.com\/blog\/author\/patrick-stox\/\">Patrick Stox<\/a> recently ran an experiment where he redirected (302) one established site to another. When Google saw the redirect, it dropped the old domain from the search results in favor of the \u201cnew\u201d domain.&nbsp;<\/p>\n\n\n\n<p>If you\u2019re not sure how Google is treating one of your 302 redirects, paste the redirected URL into Search Console\u2019s <a href=\"https:\/\/support.google.com\/webmasters\/answer\/9012289?hl=en\">URL Inspection tool<\/a>. If it shows the \u201cURL is not on Google\u201d warning, Google must be treating the redirect as permanent (301). If it is on Google, then Google\u2019s treating it as temporary (302).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1864\" height=\"656\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/6-url-is-not-on-google.png\" alt=\"URL Inspection tool\" class=\"wp-image-144876\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/6-url-is-not-on-google.png 1864w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/6-url-is-not-on-google-680x239.png 680w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/6-url-is-not-on-google-768x270.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/6-url-is-not-on-google-1536x541.png 1536w\" sizes=\"auto, (max-width: 1864px) 100vw, 1864px\"><\/figure>\n\n\n\n<p>Just make sure to check the last crawl date when doing this. If this date comes after you added the redirect, request reindexing and come back&nbsp;later.<\/p>\n\n\n\n<div class=\"sidenote\"><div class=\"sidenote-title\">Sidenote.<\/div> Google seems quicker to treat 302 redirects as permanent when redirecting to an established page or site. That\u2019s likely because the new page or website has been around a while, so there\u2019s a good chance you meant to redirect the URL permanently.<\/div>\n\n\n\n<div class=\"post-nav-link clearfix\" id=\"section1\"><a class=\"subhead-anchor\" data-tip=\"tooltip__copielink\" rel=\"#section1\"><svg width=\"19\" height=\"19\" viewBox=\"0 0 14 14\" style><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M0 0h14v14H0z\" \/><path d=\"M7.45 9.887l-1.62 1.621c-.92.92-2.418.92-3.338 0a2.364 2.364 0 0 1 0-3.339l1.62-1.62-1.273-1.272-1.62 1.62a4.161 4.161 0 1 0 5.885 5.884l1.62-1.62L7.45 9.886zM5.527 5.135L7.17 3.492c.92-.92 2.418-.92 3.339 0 .92.92.92 2.418 0 3.339L8.866 8.473l1.272 1.273 1.644-1.643A4.161 4.161 0 1 0 5.897 2.22L4.254 3.863l1.272 1.272zm-.66 3.998a.749.749 0 0 1 0-1.06l2.208-2.206a.749.749 0 1 1 1.06 1.06L5.928 9.133a.75.75 0 0 1-1.061 0z\" style \/><\/g><\/svg><\/a><div class=\"link-text\" data-anchor=\"Do you need to fix 302 redirects?\" data-section=\"fixing-302-redirects\">\n\n\n\n<h2 class=\"wp-block-heading\">Do you need to change accidental 302 redirects to&nbsp;301s?<\/h2>\n\n\n\n<\/div><\/div>\n\n\n\n<p>It depends on how Google currently treats those redirects.<\/p>\n\n\n\n<p>If it\u2019s figured things out and is already treating the accidental 302s as permanent moves, changing them to 301s may not impact anything. If it hasn\u2019t figured things out, swapping the redirects from 302s to 301s is likely the best course of action.<\/p>\n\n\n\n<p>You can use the URL Inspection tool in GSC to check how Google treats individual URLs. Unfortunately, that\u2019s pretty time-consuming if you have a lot of redirects. A faster method is to look for 302 redirects that get organic traffic. After all, that\u2019s a telltale sign that Google still treats the redirect as temporary.<\/p>\n\n\n\n<p>You can do this by crawling your site with Ahrefs\u2019 <a href=\"https:\/\/ahrefs.com\/site-audit\">Site Audit<\/a> and checking the <strong>Redirects<\/strong> report for the \u201c302 redirects\u201d warning.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/7-302-redirects-site-audit.png\" alt=\"Redirects report in Ahrefs' Site Audit\" class=\"wp-image-144878\" style=\"width:598px;height:500px\" width=\"598\" height=\"500\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/7-302-redirects-site-audit.png 1196w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/7-302-redirects-site-audit-508x425.png 508w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/7-302-redirects-site-audit-768x642.png 768w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\"><\/figure>\n\n\n\n<p>If it\u2019s there, click to view the affected URLs and sort the report by \u201cOrganic traffic\u201d from high to&nbsp;low.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1300\" height=\"454\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/8-302-redirect-urls-site-audit.png\" alt=\"Affected URLs sorted by organic traffic. Data via Ahrefs' Site Audit\" class=\"wp-image-144879\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/8-302-redirect-urls-site-audit.png 1300w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/8-302-redirect-urls-site-audit-680x237.png 680w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/8-302-redirect-urls-site-audit-768x268.png 768w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\"><\/figure>\n\n\n\n<p>As this data is an estimate, it\u2019s worth double-checking redirected URLs with traffic in GSC\u2019s URL Inspection tool.&nbsp;<\/p>\n\n\n\n<p>If the user-declared and Google-declared canonicals match, Google treats the 302 redirect as permanent.&nbsp;<\/p>\n\n\n\n<p>If they don\u2019t, the redirected page is likely getting organic traffic because it\u2019s still indexed, and Google treats it as temporary. That isn\u2019t desirable if you used a 302 redirect accidentally for a permanent move. Luckily, swapping the 302 redirect to a 301 should fix the&nbsp;issue.<\/p>\n\n\n\n<div class=\"post-nav-link clearfix\" id=\"section1\"><a class=\"subhead-anchor\" data-tip=\"tooltip__copielink\" rel=\"#section1\"><svg width=\"19\" height=\"19\" viewBox=\"0 0 14 14\" style><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M0 0h14v14H0z\" \/><path d=\"M7.45 9.887l-1.62 1.621c-.92.92-2.418.92-3.338 0a2.364 2.364 0 0 1 0-3.339l1.62-1.62-1.273-1.272-1.62 1.62a4.161 4.161 0 1 0 5.885 5.884l1.62-1.62L7.45 9.886zM5.527 5.135L7.17 3.492c.92-.92 2.418-.92 3.339 0 .92.92.92 2.418 0 3.339L8.866 8.473l1.272 1.273 1.644-1.643A4.161 4.161 0 1 0 5.897 2.22L4.254 3.863l1.272 1.272zm-.66 3.998a.749.749 0 0 1 0-1.06l2.208-2.206a.749.749 0 1 1 1.06 1.06L5.928 9.133a.75.75 0 0 1-1.061 0z\" style \/><\/g><\/svg><\/a><div class=\"link-text\" data-anchor=\"How to add redirects&nbsp;\" data-section=\"how-to-add-redirects\">\n\n\n\n<h2 class=\"wp-block-heading\">How to add redirects<\/h2>\n\n\n\n<\/div><\/div>\n\n\n\n<p>You can create 301 and 302 redirects in several ways, but editing a website\u2019s .htaccess file is the most common method. You\u2019ll find this file in your website\u2019s root directory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/9-htaccess-file.png\" alt=\"1 root directory .htaccess\" class=\"wp-image-144880\" style=\"width:528px;height:230px\" width=\"528\" height=\"230\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/9-htaccess-file.png 880w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/9-htaccess-file-680x295.png 680w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/9-htaccess-file-768x333.png 768w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\"><\/figure>\n\n\n\n<div class=\"sidenote\"><div class=\"sidenote-title\">Sidenote.<\/div> If you don\u2019t see this file in your site\u2019s root directory, either your server isn\u2019t running on Apache, you don\u2019t have this file, or it\u2019s hidden. You can check the kind of server you\u2019re running with <a href=\"http:\/\/browserspy.dk\/webserver.php\">this tool<\/a>. If it\u2019s Apache, the solution is to create a .htaccess file and upload it to your root server. If you\u2019re running Nginx, read <a href=\"https:\/\/www.bjornjohansen.com\/nginx-redirect\">this<\/a>. If you\u2019re running Windows\/IIS, read <a href=\"https:\/\/www.bowlerhat.co.uk\/301-redirects-for-seo-from-windows-server-iis\">this<\/a>.<\/div>\n\n\n\n<p>If you\u2019re using WordPress, a less daunting option is to use a <a href=\"https:\/\/ahrefs.com\/blog\/best-seo-plugins-for-wordpress\/\">free SEO plugin<\/a> to create redirects. <a href=\"https:\/\/wordpress.org\/plugins\/seo-by-rank-math\/\">RankMath<\/a> has this functionality built in, but <a href=\"https:\/\/en-gb.wordpress.org\/plugins\/redirection\/\">this plugin<\/a> will also do the&nbsp;job.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to create a 301 redirect<\/h3>\n\n\n\n<p>If you want to create a 301 redirect from one URL to another, add this to your .htaccess file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Redirect 301 \/old-page.html \/new-page.html \n<\/pre>\n\n\n\n<p>You can also do this using RankMath or the Redirections plugin. Just choose the type of redirect you want, then add your source and destination URLs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1538\" height=\"556\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/10-301-redirect-wordpress.png\" alt=\"Page to create 301 redirect\" class=\"wp-image-144882\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/10-301-redirect-wordpress.png 1538w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/10-301-redirect-wordpress-680x246.png 680w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/10-301-redirect-wordpress-768x278.png 768w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/10-301-redirect-wordpress-1536x555.png 1536w\" sizes=\"auto, (max-width: 1538px) 100vw, 1538px\"><\/figure>\n\n\n\n<p>If you\u2019re looking to redirect the entire website, add this to your .htaccess file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine on\nRewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]\nRewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]\nRewriteRule ^(.*)$ https:\/\/newsite.com\/$1 [L,R=301,NC]\n<\/pre>\n\n\n\n<p>Just know that you\u2019ll need to keep your old hosting active to redirect your site with .htaccess, which can be expensive. So it\u2019s usually better to redirect through DNS. Most registrars allow you to select either a 301 or 302 redirect for this. If you\u2019re using Google Domains, just hit <em>Website &gt; Add a forwarding address <\/em>and then enter the new domain and choose \u201cPermanent redirect.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/11-redirect-google-domains.png\" alt=\"Page to permanent redirect (301) in Google Domains\" class=\"wp-image-144883\" style=\"width:588px;height:440px\" width=\"588\" height=\"440\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/11-redirect-google-domains.png 1176w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/11-redirect-google-domains-568x425.png 568w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/11-redirect-google-domains-768x575.png 768w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\"><\/figure>\n\n\n\n<p>You can learn how to create 301 redirects for more situations (e.g., non-www to www, HTTP to HTTPS) in <a href=\"https:\/\/ahrefs.com\/blog\/301-redirects\/\">our full guide to 301 redirects<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to create a 302 redirect<\/h3>\n\n\n\n<p>If you want to create a 302 redirect from one URL to another, add this to your .htaccess file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Redirect 302 \/old-page.html \/new-page.html \n<\/pre>\n\n\n\n<p>You can also do this with RankMath or the Redirections plugin in WordPress:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1536\" height=\"564\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/12-302-redirect-wordpress.png\" alt=\"Page to create 302 redirect\" class=\"wp-image-144885\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/12-302-redirect-wordpress.png 1536w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/12-302-redirect-wordpress-680x250.png 680w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2022\/07\/12-302-redirect-wordpress-768x282.png 768w\" sizes=\"auto, (max-width: 1536px) 100vw, 1536px\"><\/figure>\n\n\n\n<p>If you\u2019re looking to redirect the entire website, use this&nbsp;code:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine on\nRewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]\nRewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]\nRewriteRule ^(.*)$ https:\/\/newsite.com\/$1 [L,R=302,NC]\n<\/pre>\n\n\n\n<p>Just know that you probably won\u2019t want to use a 302 to redirect one site to another. Most domain changes are permanent, so you\u2019ll want to use a 301. It\u2019s the same story for redirects from HTTP to HTTPS or non-www to www (and vice&nbsp;versa).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final thoughts<\/h2>\n\n\n\n<p>Redirects aren\u2019t that complicated. If you\u2019re moving content to a new location permanently, use a 301 redirect. If you\u2019re moving it temporarily, use a 302 redirect.&nbsp;<\/p>\n\n\n\n<p>That said, it\u2019s reassuring to know that if you use the wrong type of redirect, Google will likely figure out what you meant sooner or later. Does this always happen? Of course not. Google isn\u2019t always smart enough to realize what you meant every time, so it\u2019s <a href=\"https:\/\/ahrefs.com\/blog\/seo-best-practices\/\">best practice<\/a> to use the correct type of redirect where possible.<\/p>\n\n\n\n<p>Got questions? Ping me <a href=\"https:\/\/twitter.com\/joshuachardwick?lang=en\">on Twitter<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; You need to use the right one to avoid SEO issues. Let\u2019s take a closer look at how these redirects work and when and how to use&nbsp;them. A 301 redirect is a permanent redirect. It takes visitors to the<span class=\"ellipsis\">\u2026<\/span><\/p>\n<div class=\"read-more\">Read more \u203a<\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":114,"featured_media":39257,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[329],"tags":[],"coauthors":[336],"class_list":["post-144854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-seo","odd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>301 vs. 302 Redirects for SEO: Which Should You Use?<\/title>\n<meta name=\"description\" content=\"If you&#039;re moving content to a new location permanently, use a 301 redirect. If you&#039;re moving it temporarily, use a 302 redirect.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"301 vs. 302 Redirects for SEO: Which Should You Use?\" \/>\n<meta property=\"og:description\" content=\"It all comes down to Google.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/\" \/>\n<meta property=\"og:site_name\" content=\"SEO Blog by Ahrefs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Ahrefs\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-08T06:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-04T14:13:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2020\/09\/fb-301-vs-302-redirects.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"990\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joshua Hardwick\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"It all comes down to Google.\" \/>\n<meta name=\"twitter:creator\" content=\"@JoshuaCHardwick\" \/>\n<meta name=\"twitter:site\" content=\"@ahrefs\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/\"},\"author\":{\"name\":\"Joshua Hardwick\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/person\\\/e6a89cbde8e750d22996aa26e213e712\"},\"headline\":\"301 vs. 302 Redirects for SEO: Which Should You&nbsp;Use?\",\"datePublished\":\"2020-09-08T06:00:00+00:00\",\"dateModified\":\"2023-10-04T14:13:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/\"},\"wordCount\":1781,\"publisher\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/fb-301-vs-302-redirects.png\",\"articleSection\":[\"Technical SEO\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/\",\"name\":\"301 vs. 302 Redirects for SEO: Which Should You Use?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/fb-301-vs-302-redirects.png\",\"datePublished\":\"2020-09-08T06:00:00+00:00\",\"dateModified\":\"2023-10-04T14:13:59+00:00\",\"description\":\"If you're moving content to a new location permanently, use a 301 redirect. If you're moving it temporarily, use a 302 redirect.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/301-vs-302-redirects\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/fb-301-vs-302-redirects.png\",\"contentUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/fb-301-vs-302-redirects.png\",\"width\":1920,\"height\":990},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/\",\"name\":\"SEO Blog by Ahrefs\",\"description\":\"Link Building Strategies &amp; SEO Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#organization\",\"name\":\"Ahrefs\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ahrefs-logo.png\",\"contentUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ahrefs-logo.png\",\"width\":2048,\"height\":768,\"caption\":\"Ahrefs\"},\"image\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Ahrefs\\\/\",\"https:\\\/\\\/x.com\\\/ahrefs\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/ahrefs\\\/\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/ahrefscom\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/person\\\/e6a89cbde8e750d22996aa26e213e712\",\"name\":\"Joshua Hardwick\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/meme.jpg109e89523fcea81015d3cc08c79f9036\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/meme.jpg\",\"contentUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/meme.jpg\",\"caption\":\"Joshua Hardwick\"},\"description\":\"Head of Content @ Ahrefs (or, in plain English, I'm the guy responsible for ensuring that every blog post we publish is EPIC).\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/JoshuaCHardwick\"],\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/author\\\/joshua-hardwick\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"301 vs. 302 Redirects for SEO: Which Should You Use?","description":"If you're moving content to a new location permanently, use a 301 redirect. If you're moving it temporarily, use a 302 redirect.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/","og_locale":"en_US","og_type":"article","og_title":"301 vs. 302 Redirects for SEO: Which Should You Use?","og_description":"It all comes down to Google.","og_url":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/","og_site_name":"SEO Blog by Ahrefs","article_publisher":"https:\/\/www.facebook.com\/Ahrefs\/","article_published_time":"2020-09-08T06:00:00+00:00","article_modified_time":"2023-10-04T14:13:59+00:00","og_image":[{"width":1920,"height":990,"url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2020\/09\/fb-301-vs-302-redirects.png","type":"image\/png"}],"author":"Joshua Hardwick","twitter_card":"summary_large_image","twitter_description":"It all comes down to Google.","twitter_creator":"@JoshuaCHardwick","twitter_site":"@ahrefs","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/#article","isPartOf":{"@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/"},"author":{"name":"Joshua Hardwick","@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/person\/e6a89cbde8e750d22996aa26e213e712"},"headline":"301 vs. 302 Redirects for SEO: Which Should You&nbsp;Use?","datePublished":"2020-09-08T06:00:00+00:00","dateModified":"2023-10-04T14:13:59+00:00","mainEntityOfPage":{"@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/"},"wordCount":1781,"publisher":{"@id":"https:\/\/ahrefs.com\/blog\/#organization"},"image":{"@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/#primaryimage"},"thumbnailUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2020\/09\/fb-301-vs-302-redirects.png","articleSection":["Technical SEO"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/","url":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/","name":"301 vs. 302 Redirects for SEO: Which Should You Use?","isPartOf":{"@id":"https:\/\/ahrefs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/#primaryimage"},"image":{"@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/#primaryimage"},"thumbnailUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2020\/09\/fb-301-vs-302-redirects.png","datePublished":"2020-09-08T06:00:00+00:00","dateModified":"2023-10-04T14:13:59+00:00","description":"If you're moving content to a new location permanently, use a 301 redirect. If you're moving it temporarily, use a 302 redirect.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahrefs.com\/blog\/301-vs-302-redirects\/#primaryimage","url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2020\/09\/fb-301-vs-302-redirects.png","contentUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2020\/09\/fb-301-vs-302-redirects.png","width":1920,"height":990},{"@type":"WebSite","@id":"https:\/\/ahrefs.com\/blog\/#website","url":"https:\/\/ahrefs.com\/blog\/","name":"SEO Blog by Ahrefs","description":"Link Building Strategies &amp; SEO Tips","publisher":{"@id":"https:\/\/ahrefs.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ahrefs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ahrefs.com\/blog\/#organization","name":"Ahrefs","url":"https:\/\/ahrefs.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2023\/06\/ahrefs-logo.png","contentUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2023\/06\/ahrefs-logo.png","width":2048,"height":768,"caption":"Ahrefs"},"image":{"@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Ahrefs\/","https:\/\/x.com\/ahrefs","https:\/\/www.linkedin.com\/company\/ahrefs\/","https:\/\/www.youtube.com\/c\/ahrefscom"]},{"@type":"Person","@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/person\/e6a89cbde8e750d22996aa26e213e712","name":"Joshua Hardwick","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2019\/10\/meme.jpg109e89523fcea81015d3cc08c79f9036","url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2019\/10\/meme.jpg","contentUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2019\/10\/meme.jpg","caption":"Joshua Hardwick"},"description":"Head of Content @ Ahrefs (or, in plain English, I'm the guy responsible for ensuring that every blog post we publish is EPIC).","sameAs":["https:\/\/x.com\/JoshuaCHardwick"],"url":"https:\/\/ahrefs.com\/blog\/author\/joshua-hardwick\/"}]}},"as_json":null,"json_reviewers":[],"_links":{"self":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/posts\/144854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/comments?post=144854"}],"version-history":[{"count":0,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/posts\/144854\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/media\/39257"}],"wp:attachment":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/media?parent=144854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/categories?post=144854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/tags?post=144854"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/coauthors?post=144854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}