How to use a Nostr Webring

This gateway connects websites into decentralized rings using Nostr. Each ring is a set of kind 31991 events that share the same t tag — membership is just publishing the event.

1. Install a Nostr extension

You need a NIP-07 browser extension to sign events. Popular options:

  • Alby — works as both extension and browser-integrated wallet
  • nos2x — minimal signing extension
  • nos2x-fox — Firefox fork of nos2x

2. Create a webring

Go to the home page and fill out the “Create your own webring” form:

  1. Webring name — pick a unique name (e.g. “Personal Blogs 2025”)
  2. Your URL — the website you want to add
  3. Click Create — your extension will ask you to sign a kind 31991 event

Your membership lasts 4 weeks. To keep it active, re-publish your event before the TTL expires.

3. Join an existing webring

Find a webring via the home page URL lookup, then click “Join”. Or go directly to:

https://25yhg55w2nqfk006nhvvejnvprnxomaoqd0vv7035n1xoo5001nsite-webring.nsite.lol/join?webring=Your%20Webring%20Name

Your extension signs the same kind 31991 event with your URL and the webring's name. The gateway adds relay hints (the r tag) automatically.

4. Add the links to your site

Place these three links somewhere on your page (footer, sidebar, etc.):

<!-- Previous member -->
<a href="https://25yhg55w2nqfk006nhvvejnvprnxomaoqd0vv7035n1xoo5001nsite-webring.nsite.lol/?d=75d35772a9b61a9981191133c7f845490d7a6235481b4f9eba1831d07a05e7&webring=Bert%27s%20Webring&dir=prev">
  ← Previous
</a>

<!-- Join / Info -->
<a href="https://25yhg55w2nqfk006nhvvejnvprnxomaoqd0vv7035n1xoo5001nsite-webring.nsite.lol/join?webring=Bert%27s%20Webring">
  Join Webring
</a>

<!-- Next member -->
<a href="https://25yhg55w2nqfk006nhvvejnvprnxomaoqd0vv7035n1xoo5001nsite-webring.nsite.lol/?d=75d35772a9b61a9981191133c7f845490d7a6235481b4f9eba1831d07a05e7&webring=Bert%27s%20Webring&dir=next">
  Next →
</a>

The query parameters break down like this:

da hash of your URL, pubkey, and webring name (the event's d tag — copy it from the prev/next link the gateway gives you, don't write your own URL here)
webringthe webring's name (the event's t tag)
dirprev or next

Tip: URL-encode the webring name so spaces and punctuation work. The gateway does this automatically in links, but when writing your HTML by hand use %20 for spaces (Bert%27s%20Webring for Bert's Webring).

5. How navigation works

When someone clicks a prev/next link, the gateway:

  1. Queries its relay pool for all kind 31991 events with the matching #t tag
  2. Applies a 4-week since filter (events older than 4 weeks are ignored)
  3. Rejects any event with a created_at in the future
  4. Sorts by created_at ascending
  5. Finds the member by their d tag (the hash, not your raw URL)
  6. Picks the previous or next member — wraps around (first → last, last → first)
  7. Redirects the visitor to that member's website after 1 second

Event format (kind 31991)

This is the event your extension signs:

{
  "kind": 31991,
  "created_at": 1700000000,
  "tags": [
    ["d", "75d35772a9b61a9981191133c7f845490d7a6235481b4f9eba1831d07a05e7"],
    ["t", "Bert's Webring"],
    ["u", "https://example.com"],
    ["r", "wss://relay.damus.io", "wss://nos.lol", "..."]
  ],
  "content": ""
}

The d tag is a SHA-256 hash of your URL, pubkey, and the webring name — it's deterministic, so re-publishing with the same inputs produces the same value. The u tag holds your actual website URL. The r tag lists relays where the event was published — this helps other gateways discover your membership.