How to setup NIP-05 verification using Github Pages

NIP-05, also known as NIP05 or NIP5, is a Nostr Improvement Proposal that outlines a process for mapping Nostr keys to DNS-based internet identifiers. This allows users to associate their Nostr public keys with a human-readable internet address, such as “bob@example.com“. This makes it easier for users to find and follow each other on Nostr, as well as allows for more intuitive and user-friendly displays of identifiers in Nostr clients.

To set up NIP5 verification using Github Pages, you will need to follow these steps:

  1. Buy a domain. You will need a domain name to use as the base for your NIP5 internet identifier.
  2. Set up your domain’s DNS records to point to GitHub Pages. You will need to add A records to your domain’s DNS configuration to point to GitHub’s servers.
  3. Create a new Github repository. You will need to create a new repository on Github to store your NIP5 verification file.
  4. Create a new file in your repository called “.well-known/nostr.json”. This file will contain the mapping of your Nostr public key to your internet identifier.
  5. Edit your nostr.json file to include your public key and desired nickname. You will need to specify your Nostr public key and the desired nickname for your internet identifier in this file. You can use my NIP-05 as a template

    {
    “names”: {
    “_”: “ad2e457bd523f56878091176bca09e3a824fd82c04719fa7caf7ddecb28e32e7”
    }
    }

    You will need to replace my pubkey with your own pubkey. If you’d like to be just known as yourdomain.com then you can leave this as is. If you’d like to be “mycooluser@mydomain.com” then replace _ with “mycooluser”.
  6. Create a new file in the root folder of your repository called “_config.yml”. This file will contain a single line:

    include: [“.well-known”]

    This tells Github to include the “.well-known” directory in your repository when it is served as a static website.
  7. Navigate to the settings page for your Github repository. You will need to go to the settings page for your repository and select the “Pages” tab.
  8. Under “Build and deployment”, select “Deploy from branch” and choose the “Main/Master” branch. This tells Github to build and serve your repository as a static website using the files in the “Main/Master” branch.
  9. Under “Custom domain”, type in your naked domain name (e.g., “example.com”). Github may complain about this, but you can ignore the warning.
  10. Check the “Enforce HTTPS” option. This ensures that your website will be served over a secure connection.
  11. Navigate to the settings page for a Nostr client that supports NIP5, such as metadata.nostr.com or astral.ninja.
  12. Edit the NIP-05 Identifier field to reflect your internet identifier (e.g., “bob@example.com“) and press “Save”. This will associate your Nostr public key with your internet identifier.

That’s it! You should now be able to use your NIP5 internet identifier on Nostr and easily find and follow other users.

h/t to NVK for his guide for setting up NIP-05 verification using Github Pages

Scroll to Top