Human-readable Nostr identities — like email addresses for your public key.
NIP-05 lets you verify your Nostr identity with a human-readable address like user@domain.com.
Instead of sharing a long npub1... string, people can find you by your domain-verified name.
It works by placing a small JSON file at https://domain.com/.well-known/nostr.json that maps
usernames to public keys. Nostr clients check this file to verify that an account really belongs to that domain.
When a Nostr client sees user@domain.com as a NIP-05 identifier, it:
https://domain.com/.well-known/nostr.json?name=usernames objectUse the built-in generator:
$ nostr generate nip05 --address user@yourdomain.com
✓ Generated nostr.json in current directory
Or in interactive mode:
$ nostr generate nip05
NIP-05 address (user@domain): user@yourdomain.com
npub (leave blank to use active account):
✓ Generated nostr.json in current directory
This creates a nostr.json file:
{
"names": {
"user": "your-hex-pubkey-here"
}
}
Place the file at /.well-known/nostr.json on your domain:
scp nostr.json yourserver:/var/www/html/.well-known/nostr.json
Your server must return Access-Control-Allow-Origin: * for the nostr.json file.
location /.well-known/nostr.json {
add_header Access-Control-Allow-Origin *;
add_header Content-Type application/json;
}
<Directory "/var/www/html/.well-known">
Header set Access-Control-Allow-Origin "*"
</Directory>
yourdomain.com {
handle /.well-known/nostr.json {
header Access-Control-Allow-Origin *
file_server
}
}
Test that the file is accessible:
$ curl https://yourdomain.com/.well-known/nostr.json
{
"names": {
"user": "your-hex-pubkey-here"
}
}
Then update your Nostr profile's NIP-05 field:
$ nostr profile update
# Set nip05 to: user@yourdomain.com
A single nostr.json can map multiple usernames. The nostr generate nip05 command
automatically merges entries if the domain already has a nostr.json file:
{
"names": {
"alice": "abc123...",
"bob": "def456...",
"_": "789abc..."
}
}
The _ key is special — it's the default identity for the bare domain
(e.g., yourdomain.com without a username prefix).
Access-Control-Allow-Origin: *, the request will be blocked. This is the #1 issue.
application/json. Most servers do this
automatically for .json files.
nostr-cli provides helpful error messages when NIP-05 resolution fails:
Error: NIP-05 lookup failed for user@domain.com
No .well-known/nostr.json found at domain.com
To set up NIP-05 verification, add a nostr.json file at:
https://domain.com/.well-known/nostr.json
More info: https://nostrcli.sh/nip05
Error: NIP-05 lookup failed for user@domain.com
User "user" not found in domain.com/.well-known/nostr.json
Add this entry to your nostr.json:
"user": "<your-npub-hex>"
Generate with: nostr generate nip05 --address user@domain.com
More info: https://nostrcli.sh/nip05