How to Set Up NIP-05 Verification on Your Own Domain

Step-by-step guide to NIP-05 verification with a nostr.json file on your own domain, plus fixes for common problems.

Learning how to set up NIP-05 verification on your own domain takes about fifteen minutes if you already run a website. NIP-05 links a readable address such as alice@example.com to your nostr public key. Clients then show that address next to your name, and other people can check that the domain owner really vouches for that key. It is not a blue tick handed out by a company. It is a small file you control.

What NIP-05 actually proves

A NIP-05 address proves one thing: whoever controls the domain says that this name belongs to this public key. It does not prove who you are in the real world, and it does not protect your account. If your private key leaks, the address still points to the same key. If you lose the domain, the verification disappears. Treat it as a convenient label that makes impersonation harder, not as identity proof.

How to set up NIP-05 verification on your own domain, step by step

  1. Find your public key in hex. Most clients show the key as an npub. The file needs the raw hex form, a 64-character string of 0-9 and a-f. Many clients show it in the profile or key settings, and command-line tools can convert an npub to hex.
  2. Pick a name. Use lowercase letters, digits, dashes, dots or underscores. The special name “_” stands for the domain itself, so_ @example.com is shown by most clients simply as example.com.
  3. Create the file. Place a file at /.well-known/nostr.json on your domain. Its content is a small JSON object with a “names” section that maps your chosen name to your hex public key. You can add a “relays” section that maps the same hex key to a list of relay addresses where you publish.
  4. Serve it correctly. The file must be reachable over HTTPS at exactly that path, without redirects, because clients are expected to ignore redirects. It must return JSON, and it needs the header Access-Control-Allow-Origin set to an asterisk so that web clients on other domains are allowed to read it.
  5. Add the address to your profile. In your client, open profile settings and enter name@yourdomain in the NIP-05 field, then save. The client publishes an updated profile event.

Common problems and how to fix them

  • The check mark never appears. Open the file URL in a browser. If it downloads instead of displaying, or shows a 404, the path or server configuration is wrong. Static hosts sometimes hide folders that start with a dot, so check that .well-known is actually deployed.
  • It works in one app but not another. This is almost always the missing CORS header. Native apps ignore it, browser-based clients do not.
  • Wrong key format. Pasting an npub into the file instead of the hex key is the single most common mistake.
  • A redirect from the bare domain to www. If example.com forwards to www.example.com, the lookup can fail. Serve the file on the exact host in your address.
  • Uppercase letters in the name. Keep the name lowercase both in the file and in your profile.

Hosting options if you have no web server

You do not need a full server. Static hosting services, a serverless function or an edge worker can all serve one JSON file with the right header. If you have no domain at all, several nostr services offer free or paid NIP-05 addresses on their own domains. The trade-off is that the service, not you, controls whether the address keeps working.

Final check

After saving your profile, view it from a second client and from a browser-based one. If both show the address, your NIP-05 setup is done. Keep the domain renewed, and update the file if you ever rotate to a new key.


Write a comment