NIP-05 verification through GitHub Pages

Vincenzo Marcella
2 min readDec 25, 2022

--

Photo by Thought Catalog on Unsplash

Nostr is the latest and greatest innovation in decentralised social networking. It feels fresh, there is a lot of buzz around it and it has one very attractive feature: the NIP-05 verification that allows users to show that fresh check mark at the side of their username.

In every other social network getting that checkmark was a major achievement, but now, it’s actually much easier than you think. It is also really important to understand that NIP-05 is also a security mechanism, but there are plenty of explanations aroundand we’re not gonna get into in this short article, so let’s get started!

As stated in the title of this article, this verification is going to make use of GitHub pages, so first step is to create a GitHub repo.

Then clone that repo and create a folder called .well-known and inside of that folder place a file nostr.json with the following content:

{
"names": {
"<name>": "<public key>"
}
}

After having done this the next step is to serve this file. To do that you first have to create a file in the root of the repo called .nojekyll that will allow GitHub pages to serve the static json file.

After that head to the GitHub repo settings to enable GitHub pages like shown in the following screenshot.

Then just wait a few minutes for the build to be done and then head to the url <githubpage_url>/.well-known/nostr.json

then check that url in a CORS checker (like https://cors-test.codehappy.dev/) to see if it is compliant with CORS and then go on your favourite Nostr client and go at it. For clients like astral.ninja just go on the profile settings and in the NIP-05 Identifier section set <username>@<githubpage_url> then hit save and you should be done!

--

--

Vincenzo Marcella

Cloud Engineer | Serveless Advocate | Computer Science student