Why you need it
When a visitor opens shop.com, her phone cannot see who answers. A stranger on the same network can answer in the shop's place, show a page that looks right, and take her card number. The phone needs a way to check that the answer really comes from the shop.
Think of it like this
A passport at a border. The guard has never met you, but knows the passport office's signature. Your name, signed by an office the guard trusts, is enough. A passport you signed yourself gets you nowhere.
Where you’ll find it
- Let's Encrypt: Let's Encrypt is a free authority that signs certificates for hundreds of millions of websites.
- Certbot: Certbot asks Let's Encrypt for a certificate and renews it before it ends, by itself.
- cert-manager: cert-manager does the same job for apps running on Kubernetes.
- AWS: Certificate Manager hands out certificates for AWS load balancers and renews them for you.
What to know first
Key pair and signature. A private key signs a number, a public key checks it. See Public and private keys.
Authority. A company whose signature every phone and browser already trusts. Its public key comes built into them.
Finding the shop. The phone first looks up where shop.com lives. See DNS. That answer alone does not prove who is there.
How it works
- A certificate is a name with a signature. The real shop gets a certificate:
name: shop.com, signed by an authority. This is the card in the animation. The authority signs only after checking that the shop really controlsshop.com. - The phone checks the signature. Before anything is sent, the shop shows its certificate. The phone checks the signature against the authority it trusts. It matches, so the browser shows the padlock: HTTPS.
- Why the stranger cannot copy it. A certificate is public, so the stranger could copy the real one. But it also carries the shop's public key, and the phone asks the server to sign a fresh number with the matching private key, as Ben did in Public and private keys. Only the real shop holds that private key, so a copied certificate fails.
- A self-signed card gets a warning. So the stranger signs a certificate himself. The phone does not trust that signature, and shows "Your connection is not private". That page means: stop here.
- After the check, everything is scrambled. Once the phone is sure it is talking to the shop, the two agree on a new secret, and everything sent after that is scrambled. A stranger who copies it on the way sees only noise.
- Certificates end. Every certificate has an end date, often 90 days or less. After it, browsers show the same warning page for the real shop, and visitors leave. So a machine, not a person, renews it well before the date, and an alert rings if renewal fails.
An example
A visitor on café Wi-Fi opens shop.com. A stranger on the same Wi-Fi answers instead.
Without HTTPS, she types 4242 4242 ... into his page, and the card is stolen.
With HTTPS, his certificate is signed by himself, the phone warns her, and she stops. The real shop's certificate lasts 90 days and is renewed by Certbot on day 60, so its visitors never see that warning.
Further reading
- What is TLS?, Cloudflare Learning. A clear, picture-led page on what HTTPS checks and why. Start with this one.
- How it works, Let's Encrypt. How an authority checks that you own a name before it signs.
- Transport Layer Security, MDN Web Docs. The browser's side: what HTTPS protects, and what it does not.