{"id":1054,"date":"2022-12-29T18:30:10","date_gmt":"2022-12-29T18:30:10","guid":{"rendered":"https:\/\/crowdo.net\/blog\/?p=1054"},"modified":"2023-12-21T22:46:21","modified_gmt":"2023-12-21T22:46:21","slug":"301-redirects","status":"publish","type":"post","link":"https:\/\/crowdo.net\/blog\/301-redirects\/","title":{"rendered":"HTTP Status Code 301: Redirects and SEO"},"content":{"rendered":"    <div class=\"quote-box\">\r\n        <div><p>HTTP status code 301 is a tool for permanently redirecting web crawlers and site visitors to an address that differs from the initial one. This permanent redirect means that the old URL is no longer relevant, and the page has moved. After reindexing, search engines will offer visitors a new address. Let&#8217;s find out how to do 301 redirect the best way.<\/p>\n<\/div>\r\n    <\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"476091be04f8\"><strong>What is HTTP Status Code 301 Used for?<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"512\" height=\"253\" src=\"https:\/\/crowdo.net\/blog\/wp-content\/uploads\/2022\/12\/unnamed-3-3.png\" alt=\"\" class=\"wp-image-1055\"\/><\/figure><\/div>\n\n\n<p>An HTTP 301 response is an efficient, easy-to-implement web page redirect. This is a handy way to save the ranking of a particular page on your site.<\/p>\n\n\n\n<p>Here are the main reasons to use a 301 redirect:<\/p>\n\n\n\n<ul>\n<li>Preservation of accumulated user signals of content;<\/li>\n\n\n\n<li>Transfer of link value to a new page;<\/li>\n\n\n\n<li>Redirecting traffic from other addresses to the desired one;<\/li>\n\n\n\n<li>Client base retention in case of rebranding and domain change;<\/li>\n\n\n\n<li>Moving of pages;<\/li>\n\n\n\n<li>Removal of duplicate pages.<\/li>\n<\/ul>\n\n\n\n<p>What is a redirect? In a way, it\u2019s like a lifesaver. In the case of moving your entire site or individual pages, a 301 permanent redirect will retain all your labor\u2019s fruits: domain name authority and SERP position. Another question might be, Do redirects hurt SEO? The main thing is to use an HTTP status code 301 as intended. You should always opt for an address preferred by visitors and search engines, as it is strategically more important.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"c6e3e3f75ae9\"><strong>Redirection Tips<\/strong><\/h2>\n\n\n\n<p>Poorly set up redirection can have a much lower output, sometimes even harming your site. Make sure to check everything for possible errors. Here are a few basic tips on how to set up a 301 redirect.<\/p>\n\n\n\n<ul>\n<li>Avoid redirections that follow each other. Each subsequent redirection increases the load on the server and reduces the overall efficiency.<\/li>\n\n\n\n<li>Shift redirection rules from particular to general rules since conflicts between both may cause them to fail. If the particular rules are lower than the general ones, the latter will take priority in case of a conflict, as they come first on the list.<\/li>\n\n\n\n<li>Due to the fact that browsers usually remember redirections, it&#8217;s better to check the HTTP status code 301 via dedicated services.<\/li>\n\n\n\n<li>Make sure the redirection is not cyclical, as a page cannot refer to itself.<\/li>\n\n\n\n<li>A useful redirection leads to a page repeating all the nuances of the requested one.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3e8c132812bf\"><strong>Popular Types of Redirects<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"512\" height=\"269\" src=\"https:\/\/crowdo.net\/blog\/wp-content\/uploads\/2022\/12\/unnamed-1-2.png\" alt=\"\" class=\"wp-image-1056\"\/><\/figure><\/div>\n\n\n<p>Let&#8217;s take a look at the most popular redirect types. It&#8217;s worth noting that you don&#8217;t have to use a permanent redirect code all the time. It\u2019s a redundant action if your moving is short-term. And it&#8217;s definitely not recommended if you want to get rid of old domain problems. If you get banned and filtered, you move all these problems to the new address.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7096be0a705a\"><strong>HTTP status code 301<\/strong><\/h3>\n\n\n\n<p>This permanent redirect code implies that an old address is obsolete and all content is moved to a new place. The 301 redirect preserves almost all link juice and combines all stockpiled inner metrics for the new address.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5853f003acd8\"><strong>HTTP Status Code 302<\/strong><\/h3>\n\n\n\n<p>This is a temporary redirection, meaning that subsequent requests should use an old URI. It doesn&#8217;t combine all stockpiled inner metrics. The response status name depends on the HTTP version:<\/p>\n\n\n\n<ul>\n<li>HTTP 1.0 &#8211; Moved Temporarily<\/li>\n\n\n\n<li>HTTP 1.1 &#8211; Found<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a1124d5df09b\"><strong>HTTP Status Code 307<\/strong><\/h3>\n\n\n\n<p>An HTTP 307 is applicable for sporadic cases, such as short-term content moving due to maintenance.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e12b99b53abd\"><strong>Meta Refresh<\/strong><\/h3>\n\n\n\n<p>Meta refresh is a redirection done by a page rather than by a server. Oftentimes, such redirection is indicated by a several-second timer and a message like &#8220;if you haven&#8217;t been redirected, click here.&#8221;<\/p>\n\n\n\n<p>This option is fairly slow and is not recommended in terms of SEO. It can negatively impact behavioral factors and drop in ranking.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"85234de107d7\"><strong>Temporary vs. Permanent Redirect<\/strong><\/h2>\n\n\n\n<p>An HTTP 301 response and an HTTP 302 seem very similar. Nevertheless, a permanent 301 redirect is a better solution for most cases.<\/p>\n\n\n\n<p>Web crawlers do not perceive these HTTP codes equally, thus impacting SERP ranking differently. What is 301 redirect in SEO? An HTTP status code 301 is a sign for the web crawler to forget an old address and stop visiting it. An HTTP 302, in turn, signals that the search engine should continue indexing content on the initial address.<\/p>\n\n\n\n<p>In the case of a 301 permanent redirect, obsolete content won&#8217;t be displayed on SERP. With an HTTP 302, SERP will offer both pages.<\/p>\n\n\n\n<p>Temporary redirection is useful for rare cases such as:<\/p>\n\n\n\n<ul>\n<li>an old page contains links that have to be kept indexed<\/li>\n\n\n\n<li>indexing of a new page is not crucial<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"d1eef93781a3\">A 301 Redirect Code vs.<strong> Canonical<\/strong><\/h2>\n\n\n\n<p>Despite some nuances, search engines have set clear rules for command usage. Here&#8217;s how Google &amp; Co perceive them:<\/p>\n\n\n\n<ul>\n<li>A 301 redirect &#8211; &#8220;My page has permanently moved to a new place, it&#8217;s not gonna return. Please delete it from your indexing and authorize the new address.&#8221;<\/li>\n\n\n\n<li>Canonical &#8211; &#8220;I have several versions of my page. Please consider a version that I&#8217;ve marked as canonical. Let the other versions be available for visiting, but don&#8217;t index them.&#8221;<\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"f33a0c87e3d3\"><strong>In Which Scenario is Using a 301 Redirect Useful?&nbsp;<\/strong><\/h3>\n\n\n\n<ul>\n<li>it\u2019s the best option by default;<\/li>\n\n\n\n<li>HTTP 404 and old content that still has valuable links and solid traffic;<\/li>\n\n\n\n<li>domain change after rebranding or resource sale;<\/li>\n\n\n\n<li>permanently moved page.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"8400d1e98415\"><strong>Use Cases of rel=\u201dcanonical\u201d<\/strong><\/h3>\n\n\n\n<ul>\n<li>if an article has duplicates that visitors need, e.g., descriptions;<\/li>\n\n\n\n<li>same product but different colors;<\/li>\n\n\n\n<li>when a permanent redirect is challenging to implement;<\/li>\n\n\n\n<li>cross-domains with similar articles;<\/li>\n\n\n\n<li>different addresses with the same content (catalog sorting).<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"27b3c63676a8\"><strong>How to Set Up a 301 Redirect?<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"512\" height=\"288\" src=\"https:\/\/crowdo.net\/blog\/wp-content\/uploads\/2022\/12\/unnamed-4.jpg\" alt=\"\" class=\"wp-image-1057\"\/><\/figure><\/div>\n\n\n<p>How to do a 301 redirect? A permanent redirect can be set up in different ways, depending on the engine.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"47492a46ac79\"><strong>.htaccess, or httpd.conf for Apache<\/strong><\/h3>\n\n\n\n<p>This is a popular method due to its simplicity. You need to create a file called .htaccess in the site folder or edit it if the engine already provides it. Before making any changes, make a Backup of the edited file (or the entire site). For a 301 redirect Apache, write the following code using your data:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"05b5df069301\"><strong>Redirect All Pages to the New Domain:<\/strong><\/h4>\n\n\n\n<p>Redirect: <em><span style=\"color:#0071a1\" class=\"tadv-color\">http:\/\/old-site.com\/<\/span><\/em> -&gt; <em><span style=\"color:#0071a1\" class=\"tadv-color\">http:\/\/new-site.com\/<\/span><\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"65d36b9fbd54\"><strong>Redirect from One Page to Another:<\/strong><\/h4>\n\n\n\n<p>Redirect: <span style=\"color:#0071a1\" class=\"tadv-color\"><em>http:\/\/domain.com\/page-1\/<\/em> <\/span>-&gt; <em><span style=\"color:#0071a1\" class=\"tadv-color\">http:\/\/domain.com\/page-2\/<\/span><\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Redirect from www to non-www:<\/strong><\/p>\n\n\n\n<p>.www version is a subdomain. And while a subdomain is part of the main website, it&#8217;s considered a separate entity by search engines.<\/p>\n\n\n\n<p>To configure the main mirror, add the following lines to the .htaccess file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine on\nRewriteCond %{HTTP_HOST} ^www.example.com &#91;NC]\nRewriteRule ^(.*)$ http:\/\/example.com\/$1 &#91;R=301,L]\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"681b7612ebda\"><strong>Redirect from HTTP to HTTPS:<\/strong><\/h3>\n\n\n\n<p>HTTPS protocol has been a well-known ranking factor since 2014. You should add the following code to redirect the old website to the new website with a more secure protocol:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI}<\/code><\/pre>\n\n\n\n<p>Please note that the commands mentioned above are done at the server level with \u041e\u0421 Linux or Apache with an activated Mod_rewrite module. As an option, you can change the .htaccess 301 redirect with the httpd.conf configuration file. In this case, you lower the load on the server, but web admins usually do not have access to it.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7b202d2c6d95\"><strong>Implementing 301 Redirects on WordPress<\/strong><\/h3>\n\n\n\n<p>How to do a 301 redirect in WordPress? A 301 redirect to a new domain can be easily set up using a dedicated plugin. For example, the <a href=\"https:\/\/wordpress.org\/plugins\/simple-301-redirects\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Simple 301 Redirects by BetterLinks<\/a> plugin for WordPress sites. Its only drawback is that the redirected address list has to be manually input. Each <a href=\"https:\/\/crowdo.net\/blog\/seo-wordpress-plugins\/\">WordPress plugin<\/a> has its own algorithm, but overall they all are intuitive. The same goes for Shopify and the rest of CMS top dogs.<\/p>\n\n\n\n<p>Nevertheless, creating a 301 permanent redirect in a CMS is rather a last resort. You should opt for doing it at the web server level since it&#8217;s much faster, and managing redirects at two places at once can trigger conflicts. Managing redirects is already a complicated process, don&#8217;t make it even harder.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ab422d7a3a17\"><strong>Redirects by Issue Type<\/strong><\/h2>\n\n\n\n<p>Does domain forwarding affect SEO? To get better SERP positions, you should get rid of copies first.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a138111f1677\"><strong>Mass Merging of index.php, index.html, index.htm, index.asp<\/strong><\/h3>\n\n\n\n<p>This mass merging is especially relevant for SEO purposes. You might want to use mass merging to avoid page duplicates and any interference with the ranking of the main pages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteCond %{THE_REQUEST} ^&#91;A-Z]{3,9} \/index.(php|html|htm) HTTP\/\nRewriteRule ^(.*)index.(php|html|htm)$ http:\/\/site.com\/$1 &#91;R=301,L]\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"9a8525433656\"><strong>Merging Duplicates with a Slash<\/strong><\/h3>\n\n\n\n<p>Use the following code to remove a slash through your site:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>RewriteCond %{REQUEST_URI} !?\nRewriteCond %{REQUEST_URI} !&amp;\nRewriteCond %{REQUEST_URI} !=\nRewriteCond %{REQUEST_URI} !.\nRewriteCond %{REQUEST_URI} !&#91;^\/]$\nRewriteRule ^(.*)\/$ \/$1 &#91;R=301,L]<\/code><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>To make a redirect from pages w\/o a slash to ones w\/ a slash, add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteCond %{REQUEST_URI} !?\nRewriteCond %{REQUEST_URI} !&amp;\nRewriteCond %{REQUEST_URI} !=\nRewriteCond %{REQUEST_URI} !.\nRewriteCond %{REQUEST_URI} !\/$\nRewriteRule ^(.*&#91;^\/])$ \/$1\/ &#91;R=301,L]\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e7489eef7467\"><strong>How to Remove Multiple Slashes or Dashes in the URL?<\/strong><\/h3>\n\n\n\n<p>In the case of extra slashes in a URL, you should redirect to a page with one slash:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>www.site.com\/catalog\/page-1.html:\nRewriteCond %{REQUEST_URI} ^(.*)\/\/(.*)$\nRewriteRule . %1\/%2 &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p>To merge multiple dashes, write the following after <em>www.site.com\/catalog\/page-1.html<\/em>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteCond %{REQUEST_URI} ^(.*)\u2014(.*)$\nRewriteRule . %1-%2 &#91;R=301,L]<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3f40622fa42e\"><strong>To a Lowercase URL&nbsp;<\/strong><\/h3>\n\n\n\n<p>Experienced developers know that search engines distinguish different case letters, so they try to add all addresses in lowercase from the get-go. Want to know how to create a 301 redirect to a lowercase URL? Write the following code at the PHP script level:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>$lowerURI=strtolower($_SERVER&#91;'REQUEST_URI']);\nif($_SERVER&#91;'REQUEST_URI']!=$lowerURI)\n{\nheader(\"HTTP\/1.1 301 Moved Permanently\");\nheader(\"Location: http:\/\/\" . $_SERVER&#91;'HTTP_HOST'] . $lowerURI);\nexit();\n}<\/code><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"c4bb2f5a35c4\"><strong>How to Check 301 Redirect?<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"512\" height=\"288\" src=\"https:\/\/crowdo.net\/blog\/wp-content\/uploads\/2022\/12\/unnamed-10.png\" alt=\"\" class=\"wp-image-1058\"\/><\/figure><\/div>\n\n\n<p>There are several ways to check the introduced changes properly:<\/p>\n\n\n\n<ul>\n<li>go to the homepage\/another target page and look at the URL bar to check if the changes applied;<\/li>\n\n\n\n<li>step by step by manually using services like <a href=\"https:\/\/www.internetmarketingninjas.com\/tools\/header-checker\/\" target=\"_blank\" rel=\"noreferrer noopener\">Header Checker Tool<\/a> or <a href=\"https:\/\/httpstatus.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">this one<\/a>;<\/li>\n\n\n\n<li>extensions\/addons that are specific for each browser, like this <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/redirect-path\/aomidfkchockcldhbkggjokdkkebmdll\/related?hl=en\" target=\"_blank\" rel=\"noreferrer noopener\">Chrome extension<\/a>;<\/li>\n\n\n\n<li>batch-checking by using software like Screaming Frog Seo Spider that scans the whole site.<\/li>\n<\/ul>\n\n\n\n<p>Keep in mind that search engines need some time to spot an HTTP status code 301 and authorize a new address. How long it takes for 301 redirect to take effect depends on how often web crawlers visit the site. It may take up to 2-3 weeks.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ef5ed2082221\"><strong>Most Common Redirect Errors<\/strong><\/h2>\n\n\n\n<ul>\n<li>using internal redirects without changing the URL in the links;<\/li>\n\n\n\n<li>implementing a multi-step redirect;<\/li>\n\n\n\n<li>setting temporary redirects instead of permanent ones;&nbsp;<\/li>\n\n\n\n<li>incorrectly chosen redirect type;<\/li>\n\n\n\n<li>redirecting the robots.txt file;<\/li>\n\n\n\n<li>misunderstanding the difference between rel=canonical and 301 code;<\/li>\n\n\n\n<li>redirecting to irrelevant content.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>Now you know all the types of redirects and how to set up a 301 redirect. Do it right, do it the easy way, and avoid the mistakes mentioned above. Good luck!<\/p>\n\n\n\n<p><\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>At some point, you might want to change the URL of your page permanently. Use a 301 redirect to avoid the loss of  accumulated page value.<\/p>","protected":false},"author":3,"featured_media":1763,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[9],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/posts\/1054"}],"collection":[{"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/comments?post=1054"}],"version-history":[{"count":18,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/posts\/1054\/revisions"}],"predecessor-version":[{"id":2251,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/posts\/1054\/revisions\/2251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/media\/1763"}],"wp:attachment":[{"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/media?parent=1054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/categories?post=1054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crowdo.net\/blog\/wp-json\/wp\/v2\/tags?post=1054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}