The Yggdrasil-Location header

Yggdrasil-Location is a proposed HTTP header that tells browsers and other Yggdrasil-capable clients about an alternative Yggdrasil address for the current site, similar to Tor's Onion-Location.

When a user visits your clearnet site, compatible browsers could display a banner like: "This site is also available on the Yggdrasil network for better privacy and resilience."

The header looks something like this:

Yggdrasil-Location: http://[200::beef]/

Or if the website is served over multiple different addresses (eg. with DNS or Alfis), it would look like this:

Yggdrasil-Location: http://[200::beef]/, http://ygg.example.com/, http://example.ygg/

For the header to be valid, the following conditions need to be fulfilled:

Other good practices (recommended):

How to use it?

Currently, no browser implements Yggdrasil service discovery through Yggdrasil-Location. A browser extension is being worked on for Chromium- and Firefox-based browsers, along with an userscript.

How to set it up?

If you are a webmaster and wish to set up Yggdrasil-Location for your own website, see the example above for how the header should look like. For specific webserver configuration, see the examples below for Nginx, Caddy, Apache, and HTML.

Nginx

Add the following to your server block:

add_header Yggdrasil-Location "http://<your-yggdrasil-address>$request_uri"

If you have multiple addresses (eg. with DNS or Alfis), you can add them comma-separated like so:

add_header Yggdrasil-Location "http://<your-yggdrasil-address>$request_uri, http://<your-other-yggdrasil-address>$request_uri"

Caddy

Add the following to your website block:

header Yggdrasil-Location "http://<your-yggdrasil-address>{uri}"

If you have multiple addresses (eg. with DNS or Alfis), you can add them comma-separated like so:

header Yggdrasil-Location "http://<your-yggdrasil-address>$request_uri, http://<your-other-yggdrasil-address>{uri}"

Apache

You need to enable the mod_headers module in order to do this.

Add the following to your VirtualHost block or .htaccess file:

Header set Yggdrasil-Location "<your-yggdrasil-address>%{REQUEST_URI}s"

If you have multiple addresses (eg. with DNS or Alfis), you can add them comma-separated like so:

Header set Yggdrasil-Location "http://<your-yggdrasil-address>%{REQUEST_URI}s, http://<your-other-yggdrasil-address>%{REQUEST_URI}s"

HTML

If you don't have access to your webserver configuration, you can use an HTML <meta> tag in your document's <head> section.

<meta http-equiv="Yggdrasil-Location" content="http://<your-yggdrasil-address>" />

If you have multiple addresses (eg. with DNS or Alfis), you can add them comma-separated like so:

<meta http-equiv="Yggdrasil-Location" content="http://<your-yggdrasil-address>/, http://<your-other-yggdrasil-address>/" />
⚠️ Note: Adding the HTTP header in your webserver configuration is preferred if possible, as it's processed before the page content loads. The meta tag requires parsing the HTML first.