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:
2. Create a webring
Go to the home page and fill out the “Create your own webring” form:
- Webring name — pick a unique name (e.g. “Personal Blogs 2025”)
- Your URL — the website you want to add
- 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&webring=Bert%27s%20Webring&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&webring=Bert%27s%20Webring&dir=next">
Next →
</a>
The query parameters break down like this:
d | your website URL (the event's d tag, stable across re-publishes) |
webring | the webring's name (the event's title tag) |
dir | prev 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:
- Queries its relay pool for all kind 31991 events with the matching
#titletag - Applies a 4-week
sincefilter (events older than 4 weeks are ignored) - Rejects any event with a
created_atin the future - Sorts by
created_atascending - Finds the member by their
dtag (your URL) - Picks the previous or next member — wraps around (first → last, last → first)
- 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.