- 301 redirect. What does you need to know about him?
- When used 301 redirect
- How to configure 301 redirect. Options
301 redirect. What does you need to know about him?
After reading this material, you can find out what 301 redirect is when and why it is used. Well, for those who are already in the know, it will be useful to refresh their knowledge on this topic.
Let's start with the theory: redirect 301 is an HTTP response code used to continuously redirect users from the originally requested address to another (main).
For search engine robots, 301 redirectes are an indication that the page has moved to a new address. Accordingly, the old one is already irrelevant.
When used 301 redirect
- A classic example of using 301 redirect - two site names that differ only in the presence / absence of www and for a person seem to be exactly the same addresses. But for search engines, they are considered different. If you do not use 301 redirect in a similar situation, the impact on search output can be extremely negative due to duplication of content and weight redistribution.
In this case 301 site redirect is used to glue URLs, reference weight, and authority indicators.. It is believed that transmitted from 90 to 99 % reference weight.
- 301 redirect from one page to another often used if the address of one or more of them was changed for any reason, but you do not want to lose the place occupied by the old URL in the search issue.
- 301 redirect of the site in case of its movement to another domain most often just needed. Indeed, in addition to the fact that weight is transmitted through redirect 301, the proven search traffic and the customer base from which your old site could be in bookmarks are also saved.
- If available duplication of content on the site, 301 reeds of the page may well become a way out of this situation. The easiest way, of course, is to remove non-unique materials, but no one also prohibits using a redirect to another page. In this case, search engines will index only one, the specified main, page and will not have any complaints about the repeating content.
- To not delete broken links, 301 redirectes can be used (references leading to nonexistent pages will no longer mislead visitors and search bots).
How to configure 301 redirect. Options
- The simplest 301 redirect settings are made directly in the page code, which you need to redirect to a new address. To redirect to another page, you must insert the following at the very beginning of its code:
This method is suitable for having a small number of redirection pages.
- Another option is how to make 301 redirect - using the server configuration file .htaccess. To set 301 redirect from one page to another, it uses commands:
- Via .htaccess using mod_rewrite. If this module is enabled, for example, to redirect from WWW to an address that does not contain three W, 301 redirect will look like this:
In addition to the above example, this option is used in cases where it is necessary to perform larger-scale actions like redirection:
- all addresses with the “/” symbol at the end to the same without it and in the opposite direction;
- files in case of a change in their expansion;
- the entire web resource.
Correctly tuned 301 page redirecting will help you get rid of a large number of possible problems in the form of:
- loss of reference weight, “pusomer”, traffic when moving to a new site address;
- duplicate pages;
- lost items in search results when changing page address;
- broken links etc.
And in what cases do you use 301 redirect? Share your experience with us and other readers using the comment block below this article!