Dynamically provide NIP-05 nostr identifiers on your domain using PHP.
-
Open nostr.php file
-
Edit this section of code to add your usernames.
$user_list = array( "MrOstrich" => "hex_string", "twentyonemillion" => "hex_string2" );
-
Get the npub for your username and paste into https://damus.io/key/
-
Grab the resulting hex key and paste into the nostr.php file where you see "hex_string".
-
Navigate to the public root folder of your domain web hosting. This might be httpdocs, httpsdocs, public_html, or something similar. Create a folder named .well-known
-
Save two files .htaccess and nostr.php to the .well-known folder.
-
Add your NIP-05 identifier to your nostr client, ie MrOstrich@mydomain.com