Difference between HTTP and HTTPS

HTTP (Hypertext Transfer Protocol) : -

  1. Definition: - HTTP is a protocol used for communication on the World Wide Web. It is an application layer protocol that facilitates the transfer of hypertext, which can contain text, images, videos, links, and other multimedia content.

  2. Key Characteristics: Stateless: Each request from a client to a server is independent and does not rely on past requests. Connectionless: After a request is made, the connection between the client and server is closed.

  3. Operation: A client (e.g., a web browser) sends an HTTP request to a server to request a specific resource (e.g., a web page). The server processes the request and sends back an HTTP response containing the requested resource.

  4. Security: HTTP does not provide data encryption during transmission, making it susceptible to eavesdropping and man-in-the-middle attacks. It is not suitable for transmitting sensitive information such as login credentials.

  5. Example URL: example.com

HTTPS (Hypertext Transfer Protocol Secure):

  1. Definition: HTTPS is a secure version of HTTP that uses encryption to protect the data exchanged between the client and server.

  2. Key Characteristics: Secured Communication: Data transmitted between the client and server is encrypted using Transport Layer Security (TLS) or its predecessor, Secure Sockets Layer (SSL).

Port: HTTPS typically uses port 443 for communication.

  1. Operation: The process is similar to HTTP, but with an added layer of security. Before data is exchanged, a secure connection (identified by "https://" in the URL) is established through a process called the SSL/TLS handshake.

  2. Security: HTTPS ensures the confidentiality and integrity of data during transmission. It protects against eavesdropping, tampering, and man-in-the-middle attacks.

  3. Example URL: example.com