What Is A Nostr URL Handler?

nostr url handler

Share this article

So you’ve just created a set of keys and opened up your nostr network account, and now you’re wondering how to best promote yourself or your busines on the web. You have decided that having a presence on this new protocol and social media is one of the best ways for people to find out about you and what you have to offer, but now comes the hard part – getting people to come across your accounts when searching for related topics online.

One good way of doing this is by incorporating links to your Nostr profile in a prominent place on your website, like your header, footer or inside articles. Social media account link placements are a promotional practice as old as social media itself because it works. It helps make it easier for visitors who want to learn more about you or stay up to date with your content or business.

Allowing users to access your content on traditional social media is easy since you always had one universal link, but with Nostr being a protocol and having so many different platforms, it can add a bit of friction and confusion, especially for new users.

Since Nostr is not a centralised social media entity with a single domain or native app, it brings additional complications for users who wish to promote their profile or content hosted on Nostr. Still, there are clever ways around this issue that will become standard practice as Nostr matures.

The problem with protocols.

In traditional social media, if you want to promote your Twitter account, all you would need to do is use the link to the Twitter domain along with your custom handle on the end, and any user that clicks on it will be redirected to Twitter or prompted to open the Twitter app.

With Nostr, the experience is a bit different; let’s say you’re a fan of Astral.Ninja, and you prefer to use that client. So you’ll naturally link to your profile on Astral.Ninja. However, not every user has the same preference as you, and it’s a bit of a bother to then go in and log in to Astral.Ninja to follow you or comment on a post.

Suppose this user’s preferred client is Damus or Snort; they would prefer to access your profile using that client instead. This makes linking to a particular client a poor user experience.

This is where URL schemes come into play; instead of forcing users into choosing a particular client, what if the user could provide a command to say that this is a nostr profile or nostr post, and you can access it with any client that supports Nostr.

Take email, for example; I am sure you’re familiar with this internet protocol; if you’ve found an email address marked up with a URL handler online and clicked on it, you’ve probably seen your device work some magic that saves you a bit of time.

Once you click on the email address, the browser might open your preferred email client in the browser, if your default is Gmail or prompt you to open an app you’ve set as your default email client, like Outlook or Apple Mail. It makes creating an email so much easier and works with any email client, regardless of device.

What is a protocol handler?

A protocol handler is an application that knows how to handle a particular type of link either by actioning a command in your browser or sending a request to the appropriate app on your desktop or mobile device so that you don’t have to execute the process manually.

This may sound foreign to you, but you use protocol handlers on the web daily, and you might not realise that’s what you’re doing. Some of the most common protocol handlers are used for email and phone numbers hosted on websites. 

When you visit a website and would like to make contact with them, you could, of course, copy their email address and create an email or take down their phone number and give them a call, but this adds added friction for the user and lowers the chance for converting that user. 

Instead, most websites use protocol handlers like mailto: and tel:, which can be embedded into the pages HTML and when clicked, the browser would call your default email client or prompt your phone to make a call.

It’s a pretty handy option to add to your website; all you need to do is add the command before the contact detail, and that’s it; it’s a universal command that browsers and mobile devices understand.

Example:

  • Mailto links – mailto:contact@thebitcoinmanual
  • Tel links – tel:+270211231212

How would you use a nostr URL scheme?

As is the case with other protocol handlers, like email, call or SMS, Once you have the link you want to promote, append the nostr command in front of it and use this as a link on your:

  • Anchor text
  • Image
  • Icons
  • Buttons 
  • Email Signature

You could use the nostr command to link to your profile using your public key (npub), link to a nostr post using the note ID or to a nostr badge using the badge ID.

Example:

Link to your profile

nostr:npub10mxnle348mzv2dnj0ylgz3zu9gceenc29x9fr4m6mnars66j7vxsnkn8mj

Link to your notes

nostr:note1kravd8sldyfu0k7qe3k29nf09rjsjnk5pnat54763x8r2738uagqlalyxh

Link to your badges

nostr:naddr1qq3hwefdv3hkuapddejk2epddehj6um5d9hxk6tw943xzer8v5kkyctyvajsygr7e5l7vdf7cnznvune86q5ghp2xxwv7z3f32gaw7kulguxk5hnp5psgqqqw5usv94m0r

Once you’ve marked up your profile link or note link correctly, any user with a nostr account could click on that link from their desktop and mobile device. If they have a default nostr client, that command would automatically prompt the device to call the nostr client and redirect the user to a specific nostr profile or post in the client they choose to use.

This command makes promoting nostr native content and profiles much easier and can improve profile and content discovery on nostr.


Do your own research.

If you’d like to try out Nostr or want to learn more about it, we recommend checking out the following resources to kickstart your research.

Are you on Nostr?

If you are a Nostr user and want to hang out and chat with us or follow our content on your preferred Nostr front end, feel free to add us using our PubKey below.

npub10mxnle348mzv2dnj0ylgz3zu9gceenc29x9fr4m6mnars66j7vxsnkn8mj

The Bitcoin Manual’s Nostr Pubkey

Please give us your notes.

If you have used Nostr, which client do you prefer and why? How do you find Nostr followers? Are you actively promoting your profile? Drop your npub in the comments below using a URL scheme handler so we can find you.

Let us know in the comments down below.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

Alby Sunsets Custodial Wallet

Alby To Sunset Custodial Wallet

Dear Alby Users, We always knew this day would come when the training wheels would have to come off, and that day is set in

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.