HTTP vs. HTTPS
HTTP (Hypertext Transfer Protocol) sends requests and responses as plain, readable text over port 80. HTTPS is the same protocol wrapped in TLS encryption, running over port 443, which also verifies the server's identity using a certificate. The practical result is that HTTPS hides and protects data in transit, while HTTP does not.
What HTTP does
HTTP defines how a browser asks a server for a page and how the server answers, using methods such as GET and POST and status codes such as 200 or 404. By default it runs on port 80, and every byte, including form fields, cookies and the page content, travels as plain text that any device on the network path can read.
What HTTPS adds
HTTPS is HTTP sent through a TLS (Transport Layer Security) encrypted connection, by default on port 443. Before any page data is exchanged, the browser and server perform a TLS handshake: the server presents a certificate proving its identity, the two sides agree on encryption keys, and only then does the actual HTTP request travel, now scrambled so only the two endpoints can read it.
Side-by-side comparison
| HTTP | HTTPS | |
|---|---|---|
| Default port | 80 | 443 |
| Data in transit | Plain text | Encrypted with TLS |
| Server identity check | None | Verified through a certificate |
| Browser indicator | "Not secure" label | Padlock icon |
| Requires | Nothing extra | An SSL/TLS certificate |
Why the difference matters
- Security: passwords, payment details and form data cannot be read or altered in transit over HTTPS; over HTTP they can be.
- Trust: modern browsers label plain HTTP pages "Not secure," which discourages visitors from entering information.
- SEO: HTTPS is a lightweight ranking signal, and some browser features simply refuse to work at all on HTTP pages.
- Integrity: HTTPS also prevents networks, such as public Wi-Fi, from quietly injecting extra content into a page.
Switching a site from HTTP to HTTPS
- Install an SSL/TLS certificate, often a free one issued automatically through Let's Encrypt.
- Update internal links, images and scripts so they point to https:// addresses.
- Add a site-wide 301 redirect from HTTP to HTTPS.
- Update the sitemap and any search console property to the HTTPS version.
# Apache: redirect all HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Frequently asked questions
What is the main difference between HTTP and HTTPS?
HTTPS encrypts the data sent between browser and server and verifies the server's identity with a certificate. HTTP sends the same data in plain, readable text with no identity check.
Which port does HTTPS use?
HTTPS uses port 443 by default, while HTTP uses port 80. A server can technically be configured to use other ports, but these are the standard defaults browsers assume.
Do I need a certificate to use HTTPS?
Yes. HTTPS requires an SSL/TLS certificate installed on the server so the browser can verify the server's identity and set up encryption. Free certificates from Let's Encrypt cover this for the vast majority of sites.
Does switching to HTTPS slow down my site?
The extra handshake adds a very small amount of overhead on the first connection, which is negligible on modern hardware and software. HTTPS also enables HTTP/2 and HTTP/3 on most servers, which often makes sites feel faster overall.
Can a website use both HTTP and HTTPS?
Technically yes, a server can answer on both ports, but best practice is to redirect every HTTP request to HTTPS with a 301 redirect so visitors and search engines always land on the secure version.
Why does my browser say a site is "Not secure"?
That label appears when a page loads over plain HTTP, or when an HTTPS page still loads some resources like images or scripts over HTTP, known as mixed content. Installing a certificate and fixing those resource links removes the warning.
Related topics
- What Is Port 80? Networking & IP
- What Is an SSL Certificate? Security & SSL
- What Is Port 443? Networking & IP
- What Is Let's Encrypt? Security & SSL
- 301 vs. 302 Redirect Errors & Troubleshooting