Avatar
yunginter.net
5fd693e61a7969ecf5c11dbf5ce20aedac1cea71721755b037955994bf6061bb
Zach

that is interesting… didn’t catch that, I was like oh it’s just DM’s for our leaky DM’s 😂

never hear android users talk about this

#asknostr how do I set up my own handle, like on #bluesky

nostr:note1rml38sutdtcfpf7gerhycnc8eanh0a3klea2ud95rldjvadyzwms59egfm

Replying to Avatar yunginter.net

### WHAT IS NOSTR ADDRESS

Nostr Address = NIP 05 identifier

*NIP = a Nostr Implementation Possible*

“Mapping Nostr keys to DNS-based internet identifiers”

*it Maps your PubKey to URL*

You should first read [the actual NIP 05 spec](https://github.com/nostr-protocol/nips/blob/master/05.md), hopefully the following can make sense of that for end users.

a Nostr Address is how you create a readable unique handle. anyone can be @dave and there can be multiple @dave's on nostr, only one person can be dave@dave.com

In some cases, it’s an added layer of verification. If your Nostr Address ID is @stephenasmith@espn.com that’s a pretty strong indicator that this is the real Stephen A Smith, the only way to accomplish this is to have access to edit espn.com.

Personally, I use a similar handle across the web, and wanted to vanity my nip in the same fashion, just like on legacy new media, I am the only one who will have this name.

My philosophy here is, you own your own private key for NOSTR, so why have an address that’s a po box?

If you aren’t ready to pay for a domain or hosting, [github offers](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site) you the chance to learn how to do this without spending money. BenGWeeks has written this guide [Using GitHub Pages for NIP-05 Identifiers](https://github.com/BenGWeeks/BenGWeeks.github.io).

This results in his nostr address being [Ben@BenGWeeks.github.io](mailto:Ben@BenGWeeks.github.io) This is a great free way to set up a nostr address if you are ok with having github.io in your identifier. ([Don’t miss steps 3-6](https://github.com/BenGWeeks/BenGWeeks.github.io#how-do-you-to-use-github-pages-to-host-your-nip-05-identifier) in his guide, you have to Deploy it as Static HTML.)

There is nothing wrong with supporting a [NIP 05 provider services](https://nostrplebs.com/), or choosing someone kind enough to add you to theirs for free. This might serve your purposes just fine. Since we are all here learning this new protocol, I think it’s nice to learn or revisit publishing with the Hypertext Transfer Protocol (HTTP).

### LET’S GET STARTED

You are going to create a webpage with a file path that looks like this:

[https://example.com/.well-known/nostr.json](https://www.yunginter.net/.well-known/nostr.json)

[https://bengweeks.gihub.io/.well-known/nostr.json](https://github.com/BenGWeeks/BenGWeeks.github.io)

### STEP 1: Create /.well-know/nostr.json/

#### [on github](https://github.com/BenGWeeks/BenGWeeks.github.io):

add file > create new file > name it /.well-know/nostr.json/ this will create both a folder and a file named nostr.json

#### on a self hosted server:

your hosting provider most likely has a file editor that can accomplish creating folders and files and provides a text editor. If you did this on github first, you can download these files and upload them to your new host.

Copy the following to the newly create nostr.json file

{ "names": { "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" } }

Replace “bob” with your name and replace the long string of characters with the hex version of your pubkey (convert your npub key at [damus.io/key](https://damus.io/key/))

#### DOMAIN AS AN IDENTIFIER

My username is yunginternet and my domain is yunginter.net and I wanted my Nostr Address to be @yunginter.net not zach@yunginter.net so you replace the name with an underscore.

My nostr.json file looks like:

{

"names": {

"_": "5fd693e61a7969ecf5c11dbf5ce20aedac1cea71721755b037955994bf6061bb"

}

}

This results in my Nostr Address identifier being: _@yunginter.net

When I go to [metadata.nostr.com/](https://metadata.nostr.com/) or another client that allows me to edit my Nostr Address (they might still call it NIP 05 identifer) I will enter: _@yunginter.net

However, one should “expect Nostr clients to show and treat that as just @yunginter.net for all purposes.”

I like this because as on legacy new media, it just has one at sign in the identifier, instead of users having to type @bob@bob.com which looks like an email, both to human readers and operating systems, not a handle like @yunginter.net

### STEP 2: CORS

You have to turn on CORS for your site. CORS stands for Cross-Origin Resource Sharing. This makes the json “get”-able.

#### CORS ON GITHUB PAGES

If you are following [this tutorial from ben](https://github.com/BenGWeeks/BenGWeeks.github.io), Github.io pages have CORS enabled by default.

#### CORS ON A SELF-HOSTED WEBSITE

I tried to set up github with a custom domain pointing at github, and that seemed to not pass the allow access file. I still wanted my custom domain so I went to move my github page to a hosting provider.

In addition to registering a domain, you will also have to rent or set up [web hosting](https://en.wikipedia.org/wiki/Web_hosting_service), and maintain an [SSL cert](https://en.wikipedia.org/wiki/HTTPS).

Fundamentally you need to add this to a .htaccess file: I didn’t have a .htaccess file, so my hosting provider had me create one in their file browser in the root directory of my site.

Header set Access-Control-Allow-Origin "*"

It needs to be formatted [based on the type of web server](https://www.w3.org/wiki/CORS_Enabled#How_can_I_participate.3F).

It’s easier to just ask your hosting provider “how do i properly add CORS to a .htaccess file” than to figure out how their server software wants it formatted. You can search their documentation or simply reach out to their customer support.

How this is formatted depends on the type of web server software your hosting provider is running, mine suggested i do it like the following because they are running apache:

Header set Access-Control-Allow-Origin "*"

But yours might suggest you do it like the following because they are running jetty:

This is why it’s just easier to reach out to them.

cross-origin

org.eclipse.jetty.servlets.CrossOriginFilter

cross-origin

/*

Once you save your .htaccess file you should be good to go.

### STEP 3: UPDATE METADATA

Visit your [https://example.com/.well-known/nostr.json](https://www.yunginter.net/.well-known/nostr.json) page If you see this CORS json viewer [like on this page](https://www.yunginter.net/.well-known/nostr.json) you are all set.

Head to a client that allows you to input your Nostr Address (NIP 05 identifier) in your profile and you’re all set.

nostr:npub107jk7htfv243u0x5ynn43scq9wrxtaasmrwwa8lfu2ydwag6cx2quqncxg I clicked publish twice, would be nice if that took me to the article or had a posted confirmation screen or somethin

that number is… posts pulled down marked as spam that I would of seen otherwise? I see a ✅ spam from strangers… does non strangers show up in that number?

because I have a public mute list and because amethyst just has all the lists available to create feeds from (which is nice) I can have a feed of only airdrop content

these rugged edges and this floating corner pixel in android studio makes me think I know enough to work at google

happens when I click this but only on my own notes… that I still see in the timeline

I’m still learning the difference between 🔺⭕️🟥 what is this a ps5?

I keep getting processing errors from the vm… but I will say amethyst feels more polished than it appears on screen shots.

to be fair i manually typed in the image url cause i don't have images on the virtual instance... this image of the image i uploaded to google photos and then it appeared on the virtual android device. could of accidentally clicked something mousing around a touch interface.