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 title 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://gateway.example.com/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://gateway.example.com/?d=https://example.com&amp;webring=Bert%27s%20Webring&amp;dir=prev">
  ← Previous
</a>

<!-- Join / Info -->
<a href="https://gateway.example.com/join?webring=Bert%27s%20Webring">
  Join Webring
</a>

<!-- Next member -->
<a href="https://gateway.example.com/?d=https://example.com&amp;webring=Bert%27s%20Webring&amp;dir=next">
  Next →
</a>

The query parameters break down like this:

dyour website URL (the event's d tag, stable across re-publishes)
webringthe webring's name (the event's title 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 #title 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 (your 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", "https://example.com"],
    ["title", "Bert's Webring"],
    ["url", "https://example.com"],
    ["r", "wss://relay.damus.io", "wss://nos.lol", "..."]
  ],
  "content": "optional short bio"
}

The r tag lists relays where the event was published — this helps other gateways discover your membership. You can also include a servers tag with Blossom server URLs if you host your site as an nsite.