Redirecting your GitHub Pages website to a Dat URL

2019-12-07 00:00

This guide will teach you how to automatically redirect users from your GitHub Pages website to a Dat website (a dat:// link) when they are accessing your GitHub Pages website using Beaker Browser.

This guide is intended for users who dabble, or want to dabble, with the Dat protocol or decentralized/distributed technology.

This guide consists of the following sections:

Conventions used in this guide

Requirements

For this guide, ensure you have:

Enabling Dat

  1. Add a .well-known/dat file to the root folder of your GitHub Pages repository.

  2. Inside the .well-known/dat file, add the following:

     dat://your-dat-url/
     TTL=3600
  3. Add a _config.yml file to the root folder of your GitHub Pages repository.

  4. Inside the _config.yml file, add the following:

     include: [".well-known"]