RFC 9458
Oblivious HTTP
Servers see your IP on every request. OHTTP fixes that. Your requests stay encrypted, your identity stays hidden.
See the Difference
Send a real request and compare what the server sees — with and without OHTTP.
How It Works
Lilo wants to fetch data without revealing who she is.
Relay knows
Lilo's IP address
Relay can't see
Request content, target URL, response
The relay forwards encrypted blobs. It can't read your data or log your queries.
Gateway knows
Request content, target URL
Gateway can't see
Lilo's IP (only sees relay)
Your real IP never reaches the target. Each request uses fresh encryption. No correlation possible.
Result
No single party sees both Lilo's identity and her request.
Code Examples
Full OHTTP flow: client, relay, and gateway.
Frequently Asked Questions
When should I use OHTTP?
OHTTP works well when you need to query sensitive data without revealing who's asking. Common use cases:
- Safe browsing checks (verify URLs against blocklists without exposing browsing history)
- Private telemetry (collect aggregate metrics without identifying individual users)
- AI/ML inference (send queries to ML services without linking requests to identities)
- Key transparency (look up public keys without revealing communication patterns)
If your use case involves per-request unlinkability and you trust separate relay/gateway operators, OHTTP is a good fit.
Is OHTTP secure?
OHTTP uses HPKE (RFC 9180), Hybrid Public Key Encryption. Each request generates a fresh ephemeral keypair, which provides unlinkability (ciphertexts from the same client are computationally indistinguishable) and confidentiality (only the gateway can decrypt requests).
One caveat: OHTTP does not provide forward secrecy against gateway key compromise. If the gateway's private key leaks, recorded ciphertexts can be decrypted.
How do I get started?
The fastest path depends on your deployment model. Cloudflare and Fastly offer hosted OHTTP relays, so you only need to run a gateway. If you want to self-host everything, use ohttp-ts, ohttp-go, or ohttp (Rust) and partner with another organization for the relay or gateway role.
Check out the code examples to see the full client/relay/gateway flow.
Who should operate relays and gateways?
For privacy guarantees, the relay and gateway must be operated by different, non-colluding parties. Cloudflare, Fastly, and oblivious.network operate public OHTTP infrastructure. You can also deploy your own using the implementations above and partner with another organization for the complementary role.
How does a client discover gateway keys?
Gateways publish their public key configuration in a few ways. The standard approach is the well-known URI (/.well-known/ohttp-gateway). For zero-RTT discovery, you can encode the key config in DNS SVCB/HTTPS records. Closed deployments often distribute keys out-of-band via configuration.
What are OHTTP's limitations?
OHTTP protects against passive observers but has limitations. If the relay and gateway collude, they can correlate your IP with your requests. OHTTP doesn't pad messages, so timing and size patterns can leak information. And each OHTTP request is independent: session-based correlation (cookies, login) still identifies you to the target.
OHTTP is designed for unlinkability, not anonymity. It hides who made a specific request, not that requests were made.
Where can I learn more?
A few resources worth reading:
- Mozilla's OHTTP explainer is a good starting point with clear diagrams.
- http.dev/ohttp goes deeper on architecture and real-world deployments.
- Cloudflare's formal verification proves OHTTP's privacy properties using Tamarin.
OHTTP in the Wild
Real-world deployments using Oblivious HTTP.
Apple Private Cloud Compute
Apple uses OHTTP for Private Cloud Compute and Enhanced Visual Search. AI requests can't be linked to users.
Google Safe Browsing
Chrome's Safe Browsing API verifies domain safety through OHTTP. Users stay protected without revealing browsing history.
Firefox Telemetry
Mozilla sends Prio analytics through OHTTP to Divvi Up. Aggregate metrics, zero individual tracking.