Sobes.tech
Intern

What is the difference between HTTP and HTTPS?

sobes.tech AI

Answer from AI

The main difference lies in the presence of encryption.

  • HTTP (Hypertext Transfer Protocol): Data is transmitted in plain text. Anyone intercepting the traffic can read its contents. Port 80 is used.

  • HTTPS (Hypertext Transfer Protocol Secure): Data is encrypted using SSL/TLS protocols before transmission. This protects information from interception and alteration, ensuring confidentiality and data integrity. Port 443 is used. The presence of an SSL/TLS certificate confirms the server's authenticity.

The difference can be illustrated with an example of transmitting login credentials:

HTTP: Login and password are sent in plain text.

POST /login HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 25

username=user&password=password

HTTPS: Login and password are encrypted before sending.

// Data will be encrypted using SSL/TLS
// before being sent over the network
What is the difference between HTTP and HTTPS… - sobes.tech