For NIP05, only need 2 files.

Go to your website root folder (ie, httpsdocs, public_html - or something similar)

Create a folder named .well-known

It must start with a period.

In /.well-known folder, create file named .htaccess

Also must start with a period.

.htaccess file should contain this text:

Header set Access-Control-Allow-Origin "*"

Header set X-Frame-Options "SAMEORIGIN"

Create a new file in /.well-known named nostr.json

The contents should be:

{"names":{"bitcoinhatguy":"81e2f952ac7e143f9f661d63da17071de5ee6077a9e3aea8638298c13e13941d"}}

That long string has been calculated from your npub. Hope this helps.

Reply to this note

Please Login to reply.

Discussion

#[2]

Thanks DJ. Soon as I get some time I'll give it a go. Appreciate the info

I think i did it correctly. Will my NIP05 be BitcoinHatGuy@bitcoinhatguy.com? And I input that in my clients profile settings?

Hey! That’s right.

After you add everything, sometimes takes a few hours. Also I had to add the additional lines from the orangepilldev site into my htaccess file. Good luck!

Ok, I'll wait a few hours and see. Thanks. What additional lines?

I had to add all of this…I’d copy it from the link you posted above from orangepilldev vs. nostr

Header always set Access-Control-Allow-Origin "*"

Header always set Access-Control-Allow-Headers "*"

Header always set Access-Control-Allow-Methods "GET"

Looks like your headers are wrong.

Add an asterisk * inside the quotes:

Header always set Access-Control-Allow-Origin "*"

Header always set Access-Control-Allow-Headers "*"

Remove the open and close statements, not required.

It shouldn't take hours to reflect changes. Usually immediate.

Damn I've tried everything and I can't get it to verify. I've tried:

Header set Access-Control-Allow-Origin "*"

Header set X-Frame-Options "SAMEORIGIN"

and I've tried

Header always set Access-Control-Allow-Origin "*"

Header always set Access-Control-Allow-Headers "*"

Header always set Access-Control-Allow-Methods "GET"

With and without

After every change I make I go to Astral and input my identifier. It fails every time.

Maybe your host isn't playing nice. But we can force it with PHP. I've created a repo for you to try out.

https://github.com/djbooth007/nostr-NIP05-php

If you want your NIP05 to have the capitalization for BitcoinHatGuy@bitcoinhatguy.com, make sure the nostr.json file has BitcoinHatGuy as the name. Currently you have it all lowercase.