Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Using Dat with a domain

My personl site is hosted at (link) so that you can access it via dat and https. My canonical dat url is dat://

Before I used hashbase I used Github Pages, and today it dawned on me that I can have dat:// work too. It's pretty simple if you know the dat dns spec.

All I had to do was add /.well-known/dat to my site (click to view). I put the raw dat URL of my site in that file, along with a TTL.


I'm still hosted at, but the dat site is "available" at the domain now too!

Copy link

millette commented Jul 10, 2017

Seems you also need to edit _config.yml and add

include: [".well-known"]

Copy link

millette commented Jul 10, 2017

At the minimum, you need that single line in a _config.yml file. You can see my basic example here:

Copy link

pfrazee commented Jul 10, 2017

^ Millette is right, sorry folks

Copy link

specious commented Dec 26, 2017

Just got it working thanks to @millette's great advice!

Right away, Beaker Browser advertises "P2P version available" on and dat:// works as a URL.

Big thanks to @cmrberry from GitHub support for helping me figure this out, as I was perplexed why it wasn't working when I only added the .well-known/dat file.

Copy link

millette commented Mar 1, 2018

Also note that it probably won't work for custom domains, since github doesn't (yet) support https for those.

Details: isaacs/github#156 (comment)

Copy link

ChildishGiant commented Apr 7, 2018

Is there any way to get this to work on a project page? I have the dat file in place at and also the _config.yml in place but the button to switch isn't appearing.

Copy link

KarlesP commented Jul 12, 2018

@ChildishGiant did you get it to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment