ComputersInformation Technology

How to make a redirect from http to https, and why is it needed?

More and more sites are trying to switch to the new HTTPS protocol. This new mode is also picked up by search engines that rank sites with this security protocol higher. Hosting offers services in the form of providing free certificates, and corresponding plug-ins for content management systems are released. Therefore, each webmaster can easily switch to a new protocol and implement a redirect from http to https in Bitrix, Wordpress and other CMS. But what is it for?

What makes the transition from HTTP to HTTPS?

The implementation of a new security protocol for a site can occur for three reasons:

  1. Confidentiality . The Internet is an open environment, and https here protects communication between the parties. In the absence of HTTPS, the owner of the access point will be able to access private data: credit cards (when making a purchase in an online store, for example).
  2. Integrity . The https protocol ensures that the information will be delivered to the addressee intact. For example, the owner of Wi-Fi will be able to insert on the site "left" advertising, change the appearance of the site and compress images to save traffic. But if the site has HTTPS, then it guarantees that the site will not be changed.
  3. Authenticity . The certificate ensures that the site you are visiting is truly authentic.

That is, the https protocol ensures that all information will be transmitted entirely and accurately to the address. No one can change the information when it is transmitted. This is especially true for various online stores and payment services.

Also, certification has a positive effect on the promotion of the site in search engines. Therefore, many webmasters receive security certificates for their sites. But after getting faced with a problem - setting. After all, it's not enough just to get a certificate, you need to correctly redirect all traffic to a new domain and "tell" about this to search engines. How to do it?

Preparation

Before you can create a redirect from http to https, you must prepare the site. The very first action is to make internal links relative. That is, you must remove the "http: //" characters first. You can also add the letter "s" to the specified characters, so that all your articles refer to the version of the site with the security protocol, but this must be done after the final transition of the site.

It is not difficult to do this. Now there are many programs for different content management systems, which in a couple of seconds will make all the links on the site relative. For example, for the popular Wodpress system, there is a HTTP / HTTPS Remover plugin.

Checking

After installing the certificate and setting up external links, it is advisable to check whether the certificate has become "right". You can do this using the special service ssllabs.com. There you need to enter the domain name of the site by clicking on the Sabmit button, after which the system will show an assessment of the connection settings and give advice on how to solve possible problems. If the Overall Rating rating has an "A" rating, then everything is fine and your security certificate is good.

Configuring a redirect from http to https

Search engines perceive sites with the certificate HTTPS and without it as two completely different sites. Therefore, setting up a redirect from http to https is required. This procedure is equal to changing the domain. In this case, the redirect must be configured directly and it is important that it does not contain intermediate documents. Otherwise, chains of redirects can be formed, which can confuse the search engines. Naturally, this will negatively affect the perception of the site and will not bring any benefit.

The easiest option is to edit the htaccess file. Redirection from HTTP to HTTPS using this file is done if the site is hosted on the Apache server. It is necessary to write the following lines in the file:

[...]

RewriteEngine On

RewriteCond% {HTTPS} off

RewriteRule (. *) Https: //% {HTTP_HOST}% {REQUEST_URI}

[...]

You can just copy and paste into your htaccess file. Recall, it is at the root of your site and is always present on sites running under Apache.

After writing this code, check if the redirect from http to https has really started working. To do this, simply go to any page of the site and see if you are redirected to a domain with an https certificate. If so, then go to other pages.

Now that the search engine robot hits your site, it will automatically be redirected to the https version. It will take him a while to figure out what to do with this data in his algorithm. Usually the perception of the transition and redirect from http to https from the search engine "Yandex" takes about a month, although Google takes a week or two.

Remember that not always switching to https is successful. Sites of some webmasters after this procedure strongly fall on the positions in the search engines, fall out of the index and then again get into it very soon. Sometimes you have to sacrifice a large share of traffic, and many webmasters are extremely unhappy with the result of the transition. Also the TIC is reset, and although it is then restored, for the time of its zeroing the site in the eyes of advertisers looks very bad.

However, most often the redirection is almost painless and fast. "Yandex" for a month "glues" the site and its mirror, and as a result all traffic returns back, but already to a new domain with a prefix https.

Conclusion

Sooner or later, we will have to switch to a new security protocol. Soon it will become one of the key requirements of search engines that simply will not highly rank sites with the http protocol. So why not do it before your competitors do? Yes, at first it will be hard, and you will most likely lose some of the traffic, but in the long run you will definitely win. At least, so say the representatives of search engines themselves. There is no reason not to believe them. And in general, the transition to https is the improvement of your site in terms of security.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.