<-- Go to Resources

Nostr Redirect Tool

This tool is useful for creating a redirect for a domain to a Nostr profile. Nostr URLs are non-standard, so it can be a bit tricky to understand what to do. But don't worry! I spent two days figuring it out and came up with an extremely simple solution, so you don't have to.

Note: This solution works only if your domain service provider uses an Apache server.

Instructions

  1. Enter your Nostr public key

    Example: npub149mp2m0q8prpdys7x2lusv2vceraxwzr4ajf6tv3l24my3gtszxsncas0t

  2. Tap "Download .htaccess"

  3. Rename the downloaded file

    Open the folder in which the file was downloaded and rename the file to .htaccess, without the quotation marks.

  4. Paste the file into your domain folder

    Access your domain folder via FTP and paste the .htaccess file in the home (it can have the same name as your domain, or it can be public-html, or have other names).

After following these steps, you will get a redirect for your domain and an iOS/Android Nostr client fully compatible with NIP-19 will be able to open it as if it's the default app for this kind of URL.

No .htaccess? No problem!

Alternatively, just in case you can't add a .htaccess, a less elegant but working method is to create a .html page with this meta tag:
<meta http-equiv="refresh" content="0; url=nostr:npub149mp2m0q8prpdys7x2lusv2vceraxwzr4ajf6tv3l24my3gtszxsncas0t" />

For example:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=nostr:npub149mp2m0q8prpdys7x2lusv2vceraxwzr4ajf6tv3l24my3gtszxsncas0t" />
</head>
<body>
</body>
</html>

If this helps you and you want to drop some sats, you can send a Lightning payment to davidcoen@getalby.com or use this button

This tool has been created with the help of ChatGPT, which had fun formatting too!