PKI explained
What is a digital certificate?
The short answer
A digital certificate is a small signed file that ties a public key to a name, such as a website's domain, for a fixed period. A certificate authority signs it, so software that trusts that authority can trust the binding. It is public, holds no private key and encrypts nothing.
- Level
- Beginner
- Reading time
- About 9 minutes
On this page
- What is a digital certificate, in plain words?
- What is inside a digital certificate?
- What does a digital certificate prove, and what not?
- How does software check a digital certificate?
- What types of digital certificates are there?
- What do certificate files look like?
- How do you get a digital certificate, and how long does it last?
- Where to go next
- Frequently asked questions
- Keep going
Digital certificates are the building blocks of public key infrastructure. Every HTTPS website and signed app relies on them, and so do many company Wi-Fi networks. This page explains what a certificate is, what it proves and what it does not, for anyone from a curious beginner to a developer who needs the big picture before reading a certificate field by field in Anatomy of an X.509 certificate.
What is a digital certificate, in plain words?
Public-key cryptography gives everyone a key pair: a private key that the owner keeps secret, and a public key that anyone may use to check the owner’s signatures. The weak spot is that a public key is just a long number. Nothing on it says whose it is (Whose key is it?).
A digital certificate fixes that weak spot. It is a short document that says, in effect: “This public key belongs to www.example.com. This is true from 1 October until the end date written here. Signed, Example Issuing CA.” The signer is a certificate authority (CA). If your device trusts that CA, it can trust the statement, because nobody can change a word of it without breaking the CA’s signature.
In the words of RFC 5280, the internet’s certificate standard: by signing, “the CA certifies the binding between the public key material and the subject of the certificate” (section 4.1.1.3). That binding is the whole point of a certificate.
Almost every certificate you will meet uses the X.509 format, whose first edition dates from November 1988. Other systems, such as SSH, have their own simpler certificate formats, but the idea is the same.
What is inside a digital certificate?
Every X.509 certificate has the same handful of parts:
- Subject and names: who the certificate is about. For a website, the names that count are in the Subject Alternative Name list, such as
www.example.comandexample.com. Browsers do not use the older Common Name field to match host names, and other modern clients ignore it whenever the certificate lists a DNS name. - Public key: the subject’s public key, the thing being vouched for.
- Issuer: the CA that signed it.
- Validity: a start date and an end date.
- Serial number: the number the CA uses to tell its certificates apart, for example when it revokes one.
- Extensions: rules, such as which jobs the key may do and whether the certificate belongs to a CA.
- Signature: the issuer’s digital signature over everything above.
The decoder below is loaded with a sample website certificate. It runs in your browser, and nothing is uploaded.
Look for three things: the two names in the Subject Alternative Name list, the issuer (a sample issuing CA, not the website itself), and the dates. This sample is valid for ten years, on purpose, so that it keeps working as a demo. A public CA may not issue a website certificate that long. Names and jobs explains the names and key usages, and Anatomy of an X.509 certificate explains every field with real openssl output.
What does a digital certificate prove, and what not?
A certificate proves less than most people think, but what it proves, it proves precisely.
It proves that a CA your device trusts checked something about whoever asked, and then bound this public key to these names for this period. For a normal website certificate, the CA checked only that the requester controlled the domain name at that moment (Proving you own the name).
On its own, a certificate proves nothing about the party in front of you. It is public, so anyone can present a copy. The proof comes when the owner also uses the private key: in an HTTPS connection, the server signs that one connection with its private key, and your browser checks the signature with the public key inside the certificate. Only together do the two checks show that you are talking to the real www.example.com.
Three things a certificate never does:
- It does not encrypt anything. It carries a public key and a signature. In HTTPS, the keys that encrypt your data come from a separate key exchange (PKI vs TLS).
- It does not contain the private key. A
.pfxor.p12file can bundle a certificate with its private key, but that bundle is not the certificate. - It does not vouch for honesty. A phishing site can get a valid certificate for its own look-alike name, because it really does control that name.
How does software check a digital certificate?
Before it relies on a certificate, software runs a fixed set of checks, defined in RFC 5280, section 6:
- The signature: does the CA’s signature verify with the CA’s public key?
- The chain: does a chain of such signatures lead up to a root in the software’s own trust store? Usually one or two intermediate certificates sit in between (Certificate chains).
- The dates: is today, by the device’s own clock, between the start and end dates?
- The name and the job: is the name you asked for in the Subject Alternative Name list, and may this key be used for this purpose?
Revocation checks come on top, but browsers often check softly or rely on lists they download in the background. Each failed check has its own error message: a wrong name gives NET::ERR_CERT_COMMON_NAME_INVALID, and an expired certificate gives NET::ERR_CERT_DATE_INVALID. How does PKI work? shows where these checks fit in a real connection.
What types of digital certificates are there?
All of them use the same X.509 format. What differs is the job written into the certificate’s extensions, and who checks it:
| Type | What it vouches for | Who checks it | Read more |
|---|---|---|---|
| TLS server certificate, often called an “SSL certificate” | This key belongs to these domain names | Browsers and apps | Names and jobs |
| Client certificate | This key belongs to this user, service or device | The server, in mutual TLS | Mutual TLS |
| Code signing certificate | This key belongs to this software publisher | Operating systems and app stores | Code signing |
| S/MIME email certificate | This key belongs to this email address, for signing mail or receiving encrypted mail | Mail programs | Code and document signing |
| Document signing certificate | This key belongs to this person or organisation | PDF readers and e-government services | Code and document signing |
| Device certificate | This key belongs to this device | Networks and cloud services | Device identity |
| CA certificate (root or intermediate) | This key may sign other certificates | Every client that builds a chain | Who do we trust? |
A certificate signed with its own key, a self-signed certificate, is trusted only where someone has deliberately installed it. Root certificates are self-signed, and they are trusted because they are already in trust stores, not because they signed themselves.
What are DV, OV and EV certificates?
Website certificates come in three validation levels. A domain-validated (DV) certificate means the CA checked control of the names and nothing else. Organisation-validated (OV) and extended-validation (EV) certificates mean the CA also checked the company behind them. All three give exactly the same connection security: the difference is only in what the CA checked about who asked. Browsers show little of it today: Chrome and Firefox moved the EV company name out of the address bar in 2019, in Chrome 77 and Firefox 70. See Proving you own the name.
What do certificate files look like?
A certificate is stored in one of two encodings. DER is the raw binary form. PEM is the same bytes as Base64 text between -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines, which is what you paste into tools like the decoder above. The file extension, such as .crt, .cer or .pem, is only a habit and does not reliably tell you which one you have.
Two other files often travel with certificates and need more care. A .key file usually holds a private key, and a .pfx or .p12 file (PKCS #12) bundles a certificate with its private key behind a password. Treat both as secrets. The file formats appendix covers them all, and the guides show how to inspect a certificate with OpenSSL and convert PFX to PEM.
How do you get a digital certificate, and how long does it last?
You create a key pair on the machine that will use it, send the CA a certificate signing request with your public key and names, prove that you control those names, and receive the signed certificate. For websites, ACME clients such as certbot do all of this automatically. Inside an organisation, a private CA can issue certificates for internal names under its own rules. How does PKI work? walks through every step.
Every certificate has an end date that nobody can change. Since 15 March 2026, publicly trusted TLS certificates may be valid for at most 200 days, and the limit falls in steps to 47 days from 15 March 2029. Shorter lifetimes limit the damage of a leaked key, but they make manual renewal hard to keep up with, so automate it and monitor expiry.
Where to go next
- Beginners: Whose key is it? in the crash course explains certificates in about ten minutes.
- Developers and IT operations: Anatomy of an X.509 certificate, Names and jobs and the certificate decoder.
- Who signs certificates, and why we trust them: What is a certificate authority?
- How certificates fit into HTTPS: PKI vs TLS.
- Leaders: PKI for leaders in 10 minutes.
Frequently asked questions
Is an SSL certificate the same as a digital certificate?
An SSL certificate is the everyday name for a TLS server certificate, which is one kind of digital certificate. SSL itself is obsolete and today's connections use TLS, but the old name stuck. The certificate is the same X.509 document either way, and it works with whichever TLS version the server and the browser agree on.
What is the difference between a digital certificate and a digital signature?
A digital signature is a value made with a private key over some data, which anyone can check with the matching public key. A digital certificate is a document that contains a public key and is itself signed by a certificate authority. So every certificate carries a signature, and certificates are how you find the right public key for checking other signatures.
Can I make my own digital certificate?
Yes. Anyone can create a self-signed certificate, or run their own certificate authority, in a few minutes. Other systems reject it unless someone deliberately adds it, or its root, to their trust store. That is fine for testing and for private PKIs inside an organisation, but a public website needs a certificate from a CA that browsers already trust.
Is it safe to share my certificate?
Yes. Certificates are public: your server sends its certificate to every visitor, and public TLS certificates also appear in Certificate Transparency logs. What you must protect is the private key. Be careful with .key, .pfx and .p12 files, because they can contain the private key. Never email them, attach them to tickets or paste them into websites.
What happens when a certificate expires?
Clients reject it as soon as its end date has passed by their own clock, so the service fails for every user at once, with errors such as NET::ERR_CERT_DATE_INVALID. Nobody can extend a certificate: you must get a new one and install it. Automated renewal, well before the end date, is the only reliable defence against this very common outage.
Early edition. Written with AI assistance and checked against primary sources; an independent expert review is planned. Found a mistake? Tell us.