- Security: On untrusted networks (coffee shops, airports), sensitive data such as passwords, session cookies, and payment information can be intercepted unless the connection is protected by TLS.
- Trust & authenticity: TLS certificates let browsers verify that a website is the site it claims to be, preventing simple impersonation attacks.
- SEO & user experience: Search engines and browsers favor HTTPS-enabled sites; some browser features require secure contexts.


- SSL (Secure Sockets Layer) is the legacy protocol. TLS (Transport Layer Security) is its modern replacement.
- Today, when people say “SSL certificate,” they usually mean an X.509 certificate used with TLS.
- TLS provides confidentiality, integrity, and server authentication between the browser and the web server.


- The browser connects to the website and requests a secure session (this is automatic when visiting an HTTPS URL).
- The server sends a TLS certificate — a digitally signed document containing the server’s public key and identity information. The browser validates the certificate chain up to a trusted Certificate Authority (CA).

- If the certificate checks out, the browser and server perform a key exchange (often using ephemeral keys) to agree on a symmetric session key.
- The agreed symmetric key encrypts the rest of the session (fast and efficient for bulk data).

https://onlinestore.com is actually the site it claims to be and not an imposter.

- The server publishes a public key (in the certificate).
- The server keeps the corresponding private key secret.
- Asymmetric operations authenticate and perform key exchange; the resulting symmetric session key encrypts bulk data for the session.




Obtaining certificates
Certbot (Let’s Encrypt)
- Certbot is a widely used tool to request and renew Let’s Encrypt certificates.
- On Debian/Ubuntu, install certbot and request certificates as shown.
- You own the domain(s).
- DNS A records point to the server’s public IP where certbot runs.
- Port 80 is reachable from the internet for the HTTP challenge.
- For local development, use mkcert to generate locally trusted certs. These are convenient for testing but are not valid on the public internet.
- Do not deploy mkcert-generated certificates to production.
mkcert produces locally-trusted certificates for development only. Do not use mkcert-generated certificates in production.
- Enforce TLS 1.2+ (prefer TLS 1.3 where supported).
- Use modern cipher suites and enable forward secrecy.
- Enable HSTS (
Strict-Transport-Security) so browsers always use HTTPS. - Consider OCSP stapling and certificate pinning only if you understand the operational tradeoffs.
- Automate certificate renewal (Certbot can install hooks to reload Nginx after renewal).
- HTTPS (TLS) encrypts traffic between browsers and servers, protecting confidentiality and integrity.
- TLS replaced SSL; certificates issued by trusted CAs enable browsers to verify site identity.
- Let’s Encrypt + Certbot is a standard, automated way to obtain public TLS certificates.
- Use mkcert for local development only.
- Configure your web server (Nginx example above) with the certificate and key, and apply production-grade TLS hardening.
- Try obtaining a Let’s Encrypt certificate in a lab and configure Nginx to serve your site with HTTPS.
- Use tools like SSL Labs (https://www.ssllabs.com/ssltest/) to scan your TLS configuration and improve your score.