Onion-Location
The HTTP Onion-Location response header is an unofficial
HTTP header advertising the .onion (Tor hidden service)
equivalent of a clearnet URL.
Usage
Websites accessible over both the regular internet and the
Tor network use Onion-Location to signal the .onion
address where the same content is available. When Tor Browser
encounters this header, a ".onion available" prompt appears in
the address bar, offering to redirect the user to the hidden
service version of the site.
The header serves a similar role to
Location in Redirects, but instead of forcing
a redirect, the browser presents a choice. Visiting the
.onion address provides end-to-end encryption within the
Tor network without relying on exit nodes, improving both
privacy and security. Organizations like The Guardian,
Deutsche Welle, the Internet Archive, and various privacy
services deploy this header alongside
Strict-Transport-Security and
Https to give Tor users a native hidden service
experience.
The Tor Project introduced this header as a standard
mechanism, replacing the earlier practice of manually linking
to .onion mirrors on web pages.
Values
The value is a single absolute URL pointing to the .onion
equivalent of the current resource. The URL uses the same
scheme (http:// or https://) and includes the full
.onion hostname with the corresponding path.
Example
The Internet Archive serves an Onion-Location header
pointing to its .onion mirror. The long base32-encoded
hostname is a standard v3 Tor onion address.
Onion-Location: https://archivep75mbjunhxc6x4j5mwjmomyxb573
v42baldlqu56ruil2oiad.onion/details/funkymix-304
A privacy-focused search engine advertising its hidden service
equivalent. The .onion URL mirrors the clearnet URL path
structure.
Onion-Location: http://search.privacyrkwfzsfmwtfnrilikxv7xkh
w2feso7stq2ajmc6wx43hgj6ad.onion/
The Guardian newspaper provides its .onion address for
readers accessing news content through Tor Browser.
Onion-Location: https://www.guardian2zotagl6tmjucg3lrhxdk4dw3
lhbqnkvvkywawy3oqfoprid.onion/world/2025/may/27/example-story
Takeaway
The Onion-Location header lets websites announce their
Tor hidden service mirror so Tor Browser users are prompted
to switch to the native .onion address for stronger
privacy.