HTTP

Hypertext Transfer Protocol (HTTP) is a communications protocol. It is used to send and receive web pages and files on the internet. It was developed by Tim Berners-Lee and is now coordinated by the W3C. HTTP version 1.1 is the most common used version today. It is defined in RFC 2616.

HTTPS

Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP. It is the protocol in which the data is sent between your browser and the website that you are connected to. The ‘S’ at the end of HTTPS stands for ‘Secure’. It means all communications between your browser and the website are encrypted.

Redirect from HTTP to HTTPS

SSL certificate allows redirecting from http to https. This can automatically redirect users to the secured https connection. SSL (Secure Socket Layer) makes the websites secured by providing the data encryption between the web hosting server and web browser. In Plesk, the redirection can be handled in web.config file. The file web.config is the configuration file for the web application. It is an XML document which resides in the root directory of the site. It stores security configurations, database connections, session states, error handling in it.

The following code can automatically redirect to https in the web.config file.

<rewrite>
 <rules>
 <rule name="HTTP to HTTPS redirect" stopProcessing="true">
 <match url="(.*)" />
 <conditions>
 <add input="{HTTPS}" pattern="off" ignoreCase="true" />
 </conditions>
 <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
 </rule>
 </rules>
 </rewrite>

Categorized in:

Tagged in:

, ,