Please enable JavaScript to use CodeHS

Cybersecurity Basics

What Is HTTPS?

You've seen the little padlock next to a website's address a thousand times. It confirms two very specific things about your connection — and it does not mean the website itself is safe. Learn exactly what https promises, then try an interactive address bar inspector to catch the trick that fools even careful people.

Security ~9 min Beginner friendly
The Big Idea

http vs. https: what's that "s" doing?

Every website address starts with http:// or https://, even when your browser hides that part from view. HTTP (HyperText Transfer Protocol) is just the basic set of rules your browser and a website use to talk to each other — "send me this page," "here it is." On its own, that conversation happens in the open, like talking at a normal volume in a crowded room.

HTTPS is the same conversation with one addition: the S stands for Secure. It wraps that whole conversation in encryption, a process that scrambles the data so that anyone listening in along the way — on the network between your device and the website — can't read it.

The little padlock icon next to the address bar is just your browser's way of telling you, in real time: "yes, this specific connection right now is running https." That's it. It's a status light, not a safety certificate for the whole website.

Simple definition: https = http + encryption. The padlock confirms the "s" is switched on for this connection — nothing more, nothing less.


What It Actually Means

What https actually promises — and what it doesn't

Https makes exactly two specific promises about your connection to a site. Not "this site is good." Not "this site is safe." Two narrow, technical promises:

1. Encryption

Nobody snooping on the network between your device and the website — someone else on public Wi-Fi, for example — can read what you're sending or receiving. A password or credit card number you type stays scrambled in transit.

2. Identity verification

The site has a certificate issued by a trusted authority, confirming your browser really is talking to the domain it claims to be — not some other server pretending to be it mid-connection.

Here's the part that trips people up, including a lot of adults: https does not promise the website itself is trustworthy, safe, or legitimate. Getting a certificate and turning on https is quick, often free, and available to literally anyone who registers a domain name — including someone who registers a scam domain built to imitate a real company. A phishing site can have a padlock and https too. "Look for the padlock" used to be common advice; today, it's outdated on its own.

The padlock only certifies the connection to whatever domain is in the address bar — it says nothing about whether that domain belongs to who you think it does. You still have to check that part yourself. More on exactly how, further down.


Behind the Padlock

Who's checking IDs? Certificates, briefly

So how does your browser know a site's identity claim is even worth trusting? A trusted third party called a certificate authority checks it first. Think of a certificate authority like an ID checker at the door of a building: before letting a website use https under its name, the certificate authority verifies that whoever is asking really does control that domain, then issues a certificate — a kind of digital ID card — that says so.

Your browser automatically checks that certificate every time it connects. If it's valid and signed by an authority the browser already trusts, you get the padlock. You never see any of this happen — it's all automatic, in the background, in a fraction of a second.

Notice what's not on that card: any judgment about whether codehs.com is a good, safe, or honest website. A certificate authority checks "does this domain really belong to whoever is asking" — not "is this a website you should trust." Those are two completely different questions, and only the first one gets checked automatically.


Interactive

Inspect the address bar

Below are five address bars, shown exactly as they might appear in a real browser. Click each one to reveal what's actually true about it — including one that will probably surprise you.

Click a browser bar to inspect it

Behind the Scenes

What your data looks like in transit

Say you're logging into a site and typing the password password123. Here's what a snooper positioned somewhere on the network between you and the website would actually see, over each type of connection.

Over plain http (no encryption)
watcher
password123
Over https (encrypted)
watcher
password123

Same password, same trip across the network. Over http it stays readable the whole way. Over https it's scrambled the moment it leaves your device, and only unscrambled once it safely reaches the real server.


The Real Takeaway

Check the padlock. Then check the address.

The address bar inspector above should have made one thing clear: a padlock alone isn't proof a site is legitimate. Here's the actual, two-part habit worth building.

1

Check for https before typing anything sensitive. A password, a credit card number, or personal information should never be typed into a plain http page — that part is not encrypted, full stop.

2

Read the actual domain name, character by character. Look for swapped letters and numbers (an "l" replaced with a "1"), extra words bolted onto a familiar name, and unusual endings you don't recognize. This is exactly what phishing sites rely on people skipping — and it works even when the site has a perfectly valid padlock.

3

Be extra careful with links from an email or text instead of typing an address yourself or using a saved bookmark. Scammers who build lookalike domains almost always deliver them through a link, hoping you won't look closely at where it actually leads.

Remember: https protects the trip your data takes across the network. It says nothing about who is waiting at the other end — that's a trick called phishing, and it relies on people trusting a padlock instead of checking the address. Read more in Social Engineering Explained.


Your Turn

Check your understanding

A friend tells you, "this site is safe — it has the padlock icon." Is the padlock enough information to know that? What else, if anything, would you want to check first?

Your answer:

Sample answer: the padlock alone isn't enough. It only confirms that the connection to whatever domain is in the address bar is encrypted, and that the domain has a certificate proving it controls that exact address — it doesn't confirm the site is trustworthy or really belongs to the company it claims to be. Before trusting it, I'd read the actual domain name carefully for misspellings or extra words, make sure I typed the address myself or used a bookmark rather than clicking a link, and treat anything asking for a password or payment info extra carefully.


Check Yourself

Quick quiz

1. What does the padlock icon in the address bar actually confirm?

2. A phishing site imitating a real bank shows a valid padlock and https. How is that possible?

3. Before typing a password into a site, what should you check?

Keep learning about digital safety

You've now seen how data gets protected in transit — through a VPN's tunnel, and through https. Next, see what happens when that protection isn't enough and a company's stored data gets exposed in a breach.

Part of the Cybersecurity Basics tutorial series.