Documentation / /

Use a domain name with dat://

By default, dat:// websites are addressed with a 64 character URL. For example, here’s the raw dat:// URL for dat://


A raw dat:// URL is similar in some ways to an IP address:

  • Used as an identifier that points to a website
  • Difficult to remember
  • Most of the time it’s preferable to reference it with a domain name

Learn more about dat:// URLs

Domain names and dat://

There are a couple of ways to use your domain name with a dat:// website.

If you want to use your domain name with dat://, but don’t care about republishing your website on https://, jump to Dat DNS TXT records.

If you want to use your domain name with dat://, and also want to mirror the same content on https://, jump to .well-known/dat.

Dat DNS TXT records

To point your domain name to a dat:// website, you can use a DNS TXT record.

First, open your domain name registrar’s DNS settings page. Then add a TXT record with the value datkey=<yourdatkey>, where <yourdatkey> is the 64 characters after dat:// in your website’s URL.

In this example, the first TXTrecord will apply to the top-level domain, and the second will apply to the www subdomain:

@    | TXT  | datkey=327bf0...
www  | TXT  | datkey=123456...

Dat DNS TXT record specification


If you want to publish your website under your domain name with both dat:// and https://, consider using the .well-known/dat technique.

This approach requires publishing a file at https://<yourdomain>/.well-known/dat with the following structure:


With this technique, Beaker uses the .well-known/dat file to identify which dat:// URL it should display when someone visits your website.

If you use this technique, we recommend using a tool like homebase to manage your website. homebase will seed your dat:// website and make sure it stays online, mirror your website to https://, and automatically publish the .well-known/dat file.

.well-known/dat specification

Further reading