Security6 min read10 interview questions

HTTPS and TLS in plain words

What the padlock means and how a secret is shared with a stranger.

In one sentenceHTTPS is normal web traffic wrapped in encryption, so only you and the website can read it.

Think of it like thisIt is sending your letters in a locked box that only the recipient can open, after checking their ID first.

The big picture

Tap any step to see where to use it, how to use it and an example result.

Two jobs: privacy and proof

Encryption stops people on the network from reading your data. The certificate, signed by a trusted authority, proves you reached the real site and not an impostor.

Sharing a secret in public

Browsers and servers use clever maths so they can agree on a secret key while everyone watches, without the key ever being sent. They then use that key for fast encryption of all traffic.

What it does not do

HTTPS does not make a site trustworthy. A scam site can have a padlock. It also does not hide which site you visited. It protects the content in transit.

Common mistakes

  • Thinking a padlock means a site is safe to trust.
  • Letting a certificate expire, which scares visitors with warnings.
  • Mixing secure and insecure content on one page.

Quick recap

  • HTTPS adds privacy and proof of identity
  • A certificate proves who the server is
  • A shared key encrypts the traffic
  • A padlock does not mean the site is honest

Try it yourself

Click the padlock on any site and read the certificate: who issued it and when it expires.

Top 10 interview questions

Ordered from basic to advanced. Try answering out loud first, then open the answer.

  1. What is HTTPS?Basic

    HTTP running inside an encrypted TLS connection. It protects the data from being read or changed on its way and proves you are talking to the real site.

  2. What is the difference between HTTP and HTTPS?Basic

    HTTP sends data as plain text that anyone on the path can read. HTTPS encrypts it, so passwords and personal data stay private.

  3. What is TLS?Basic

    Transport Layer Security, the protocol that provides the encryption and identity checking. It replaced SSL, which is now obsolete, although people still say SSL.

  4. What does the padlock in the browser mean?Basic

    The connection is encrypted and the certificate matches the site name. It does not mean the site itself is trustworthy or safe.

  5. What is a digital certificate?Intermediate

    A document that links a domain name to a public key, signed by a certificate authority the browser trusts. It lets the browser check it is talking to the real owner of the domain.

  6. What is a certificate authority?Intermediate

    An organisation trusted by browsers and operating systems to verify domain ownership and sign certificates. Let's Encrypt is a free example.

  7. What happens during a TLS handshake?Intermediate

    The client and server agree on a version and cipher, the server sends its certificate, the client verifies it, and they create shared session keys. After that all data is encrypted with those keys.

  8. What is the difference between symmetric and asymmetric encryption, and how does TLS use both?Intermediate

    Asymmetric uses a public and private key pair and is slow, so it is used to prove identity and agree on a key. Symmetric uses one shared key and is fast, so it encrypts the actual data.

  9. What is HSTS?Advanced

    A header that tells browsers to use HTTPS only for a site for a given time, preventing downgrade to plain HTTP and stripping attacks.

  10. What is mutual TLS (mTLS) and when is it used?Advanced

    Both sides present certificates, so the server also verifies the client. It is common between services inside a system to ensure only trusted workloads can talk to each other.

Back to Learn Hub

Guides are simplified on purpose. Tool names and details change, so check the official documentation before relying on a detail.