The 301 redirects are shown as a completely indispensable resource to be able to modify, eliminate and consolidate web pages. A 301 redirect, as its name suggests, consists of permanently redirecting the URL of a website to a new one, ensuring that when a user goes to access your website through the old URL, they are redirected directly to the new one without having to suffer the famous “404 error”.
THE IMPORTANCE OF 301 REDIRECT
The importance of a 301 redirect is beyond doubt, since it is shown as the only possibility to permanently redirect a web page and pass the search engine test. We will use the 301 redirect when we carry out maintenance work on our web site , for example when we want to change the url of a page, change a directory, change the entire domain, when there are problems with duplicate content, broken urls or to establish the canonical version of the if you.
There are other possibilities when it comes to redirects, such as meta refresh, Java Script or temporary 302 redirects, but without a doubt none of them come close to 301.
The key to the 301 is that it is a redirect that manages to transmit all the value that the link of the old page has , something essential if we take into account that search engines pay attention to the popularity of a website based on its links.
With 301 redirects, the old page is automatically removed from the index and the new one is included so that search engines can take it into account as soon as possible. In addition, it is responsible for transferring the value of the previous URL to the new one . They are a great ally for web positioning in Google .
HOW TO DO THEM?
Performing a 301 redirect is much easier than it may seem at first . All you have to do is edit a server file called ” .htaccess “ , which is the one in charge of controlling the server’s configuration. It is the first element that is loaded when trying to access a user trying to access your website, in some cases even before the page appears as such. You can find it at the root of your website .
Of course, you must bear in mind that the “.htaccess” file is really sensitive and plays a very important role, so you must be very careful when editing it, since any slight error could completely dislodge your web page. It is advisable to make a backup copy of the file, in case the flies (better safe than sorry).
REDIRECTS IN .HTACCESS
1. Access the .htaccess file: To access the file you must connect through an FTP system to your server and search for it until you find it. Keep in mind that as it is a hidden file, you must enable the option to view all files. Once you have found it, open the file with any text editor.
2. Edit it : The next thing will be to edit the file properly.
3. Save : once you have made the corresponding modifications, save it again with the ANSI encoding to ensure that no errors will appear.
TAKE PRECAUTIONS, AVOID ERRORS WHEN EDITING .HTACCESS
You have to be very careful when editing the file as a wrong change could cause a real disaster on our website. So take precautions and make a backup in case the flies (better safe than sorry).
HOW LONG SHOULD THEY BE KEPT?
Although 301 redirects are permanent and should not be changed at any time, we know that it is really difficult to maintain a redirect for an unlimited time . But in any case, it is very important that this redirect remains active for at least a year, since it takes between 6 and 12 months for search engines to recognize a new address .
If you remove the redirect before the search engines have recognized the new URL, you run the risk that all the pages that were linked will fall to the “404 error” . So that this does not happen to you, we recommend that you notify those reference sites so that they can update the outbound links to your pages and that you keep the redirects active for as long as possible, never less than a year.
In short, the 301 redirect is essential to add value to your new website and to get visitors to it . Give them the necessary attention and make the necessary redirects and enjoy a better SEO on Page optimization of your website.