Short answer: usually not. A connection to a v3 onion service is encrypted end to end between the client's tor and the service's tor, and the address itself is the server's public key, so you can't be talking to an impostor if you typed the right address. Those are the two main things HTTPS gives you on the clearnet. Tor already did both.

Tor Browser agrees. It treats http:// onion pages as a secure context: no "not secure" warning, an onion icon in the address bar instead of a broken padlock, and features that normally require HTTPS (secure cookies, service workers and so on) work. For a typical onion site, plain HTTP on port 80 is the normal, recommended setup, and that's what our Nginx guide uses.

That said, there are real cases where a certificate is worth having, and a couple where it's actively a bad idea.

When a certificate does help

Tor and the web server are on different machines. The Tor encryption ends at the tor daemon. If tor forwards to a web server across a LAN or a data centre network, that last hop is plain HTTP. With TLS terminated on the web server itself, the traffic stays encrypted all the way. Large deployments that put an onion service in front of an existing site often fall into this category, and it's one of the reasons Facebook wanted a certificate in 2014. (You can also solve this with a VPN or WireGuard tunnel between the machines, which is less hassle than buying a certificate.)

Your software assumes HTTPS. Plenty of web applications hardcode https:// redirects, set HSTS, or mark cookies as Secure based on the scheme, and some of them behave badly over HTTP regardless of what the browser thinks about onions. Browsers other than Tor Browser (Brave's Tor windows, for example) may not apply the same secure-context rule. Sometimes a certificate is less work than fighting the app.

Identity. A v3 address proves you're talking to the holder of a key. It doesn't prove who holds that key. An Extended Validation certificate binds the onion address to a verified legal organisation, and Tor Browser will show that organisation's name. For a big brand trying to make phishing harder, that's a meaningful signal. For anyone else, it's not.

Habit. Users are trained to look for the padlock and some of them are confused by its absence. This is a weak reason on its own, but it comes up.

When it's a bad idea

If you're running an onion service at least partly to keep the server's location or the operator's identity private, think hard before getting a public certificate.

Publicly trusted certificates are logged in Certificate Transparency logs, which anyone can search. The moment you get a certificate for your onion address, the address is published in those logs, with a timestamp. If you wanted the address to stay unlisted, it's now listed.

The certificate also contains whatever you put in it. An EV certificate carries the organisation's verified name and jurisdiction. A certificate whose subject alternative names include both your onion and a clearnet domain links the two forever, in public. Even a DV certificate means a CA has a billing record and validation logs. All of that is fine for the BBC. It's a disaster for an anonymous publisher. We list this among the classic mistakes in How Onion Services Leak Their Real IP.

A self-signed certificate avoids the logs but gives users a scary warning page, trains them to click through warnings, and adds nothing Tor doesn't already provide. Don't.

Where to get one

Not from Let's Encrypt, which doesn't issue for .onion names.

The CA/Browser Forum, the body that sets rules for publicly trusted certificates, allowed EV certificates for onion names in 2015, after DigiCert had already issued Facebook's. Domain Validated certificates for v3 onion addresses were allowed later, through a ballot passed in 2020, with validation methods that prove control of the onion address itself (the CA connects over Tor and checks a challenge, or you sign a request with the onion service key). The practical upshot is that a small number of CAs offer onion certificates. DigiCert has done EV for years. HARICA, a Greek academic CA, became known for offering cheaper DV certificates for onions. Prices and availability change, so check current offerings rather than trusting any list, including this one.

There's also been standards work on automating onion certificate issuance through ACME, the protocol Let's Encrypt uses. If that ends up widely supported, the cost argument against onion TLS mostly goes away, though the Certificate Transparency one doesn't.

Setting it up

Once you have the certificate, the config is ordinary TLS. Add a second virtual port to the onion service:

HiddenServiceDir /var/lib/tor/mysite/
HiddenServicePort 80 127.0.0.1:8080
HiddenServicePort 443 127.0.0.1:8443

Then a TLS server block in Nginx on 127.0.0.1:8443 with the certificate and key, exactly as you would for a clearnet domain, using the onion address as server_name. Keep port 80 as a redirect to HTTPS if you like, or keep serving both. If you advertise the onion through an Onion-Location header, make sure the scheme in the header matches what you actually serve.

Renewals are the part people forget. Onion certificates follow the same maximum-lifetime rules as every other public certificate, and those limits keep getting shorter, and with manual issuance you need a calendar reminder. An expired certificate on an onion site looks exactly like an impostor to a careful user, which is the opposite of what you were trying to achieve.

Deciding for your own site

If you're an established organisation with a clearnet presence, a split architecture, or software that insists on HTTPS, get a certificate and don't think twice. If you're anyone else, skip it. Tor's own TLS-like guarantees, end-to-end encryption and an address that authenticates the server, cover what you need, and a certificate brings costs and exposure that the onion was supposed to avoid. The structure of the address that makes this possible is explained in Anatomy of a v3 .onion Address.

#https #tls #certificates #onion-services #certificate-transparency