Hypertext transfer protocol secure (HTTPS) is the secure version of HTTP, the primary protocol used to send data between a web browser and a website.
HTTPS is encrypted to increase the security of data transfer. This is particularly important when users transmit sensitive data by logging into a bank account, email service, or health insurance provider.
Any website, especially those that require login credentials, should use HTTPS. In modern web browsers such as Chrome, websites that do not use HTTPS are marked differently than those that are. Look for a padlock in the URL bar to signify the webpage is secure. Web browsers take HTTPS seriously; Google Chrome and other browsers flag all non-HTTPS websites as not secure.
How does HTTPS work?
HTTPS uses an encryption protocol to encrypt communications. The protocol is called Transport Layer Security (TLS), formerly Secure Sockets Layer (SSL). This protocol secures communications by using what’s known as an asymmetric public key infrastructure. This type of security system uses two different keys to encrypt communications between two parties:
- The website owner controls the private key and keeps it private, as the reader may have speculated. This key lives on a web server and is used to decrypt information encrypted by the public key.
- The public key is available to everyone who wants to interact with the server securely. Information that’s encrypted by the public key can only be decrypted by the private key.
Why is HTTPS important? What happens if a website doesn’t have HTTPS?
HTTPS prevents websites from having their information broadcast in a way that’s easily viewed by anyone snooping on the network. When information is sent over regular HTTP, the information is broken into packets of data that can be easily “sniffed” using free software. This makes communication over an unsecured medium, such as public Wi-Fi, highly vulnerable to interception. All communications over HTTP occur in plain text, making them highly accessible to anyone with the correct tools, and vulnerable to on-path attacks.
With HTTPS, traffic is encrypted such that even if the packets are sniffed or otherwise intercepted, they will come across as nonsensical characters. Let’s look at an example:
Before encryption:
This is a string of text that is completely readable
After encryption:
ITM0IRyiEhVpa6VnKyExMiEgNveroyWBPlgGyfkflYjDaaFf/Kn3bo3OfghBPDWo6AfSHlNtL8N7ITEwIXc1gU5X73xMsJormzzXlwOyrCs+9XCPk63Y+z0=
In websites without HTTPS, Internet service providers (ISPs) or other intermediaries can inject content into web pages without the website owner’s approval. This commonly takes the form of advertising, where an ISP looking to increase revenue injects paid advertising into the web pages of its customers. Unsurprisingly, when this occurs, the profits for the advertisements and the quality control of those advertisements are in no way shared with the website owner. HTTPS eliminates the ability of unmoderated third parties to inject advertising into web content.
For a complete list of benefits HTTPS provides, see Why use HTTPS?
What port does HTTPS use?
HTTPS uses port 443. This differentiates HTTPS from HTTP, which uses port 80.
(In networking, a port is a virtual software-based point where network connections start and end. All network-connected computers expose several ports to enable them to receive traffic. Each port is associated with a specific process or service, and different protocols use different ports.)
How else is HTTPS different from HTTP?
Technically speaking, HTTPS is not a separate protocol from HTTP. It is simply using TLS/SSL encryption over the HTTP protocol. HTTPS occurs based upon transmitting TLS/SSL certificates, which verify that a particular provider is who they say they are.
When a user connects to a webpage, it will send over its SSL certificate, which contains the public key necessary to start the secure session. The two computers, the client and the server, then go through a process called an SSL/TLS handshake, which is a series of back-and-forth communications used to establish a secure connection. To dive deeper into encryption and the SSL/TLS handshake, read about what happens in a TLS handshake.
How does a website start using HTTPS?
Many website hosting providers and other services will offer TLS/SSL certificates for a fee. These certificates will often be shared amongst many customers. More expensive certificates can be individually registered to particular web properties.