Skip to content

feat(web): copy the site's IPFS hash + custom-domain guide at /domain - #117

Merged
ehsan6sha merged 2 commits into
mainfrom
feat/own-domain-guide
Aug 31, 2026
Merged

feat(web): copy the site's IPFS hash + custom-domain guide at /domain#117
ehsan6sha merged 2 commits into
mainfrom
feat/own-domain-guide

Conversation

@ehsan6sha

Copy link
Copy Markdown
Member

Lets someone put a website they generated in FxFiles onto their own domain.

1. App — copy the IPFS hash (web only)

_stableLinkSection gains a Use your own domain block under the shareable link: the live site's CID in monospace, plus Copy IPFS hash, Copy DNSLink value (copies /ipfs/<cid> — the exact string Cloudflare's field wants) and a link to the guide.

It reads pointer.currentCid, so it always agrees with the shareable link above it, and shows a "publishing…" line rather than a stale hash. Refresh path verified rather than assumed: _pointer holds the live WebsiteGroupPointer the service mutates, the screen listens to WebWebsiteService, and _notify() fires after publishLatest() resolves — so the row updates itself once a regenerate publishes. flutter analyze: no issues.

Native tree untouched.

2. Guide — site/domain/ → files.fx.land/domain

Two entry paths behind tabs (buy at Cloudflare / already own a domain), then one shared walkthrough: Web3 → Create Gateway → IPFS DNSLink → paste /ipfs/… → Deploy. Then how to update after a regenerate, and troubleshooting.

Screenshots are real captures of the live dashboard, cropped to the relevant region and redacted (account email, zone/account IDs).

Why this approach

  • Cloudflare shut down its public IPFS gateway on 2024-08-14, so every older tutorial's cloudflare-ipfs.com CNAME is dead. The Web3 IPFS DNSLink gateway is the current path and is on the free plan — verified live in the dashboard: "You have used 0 of 15 IPFS DNSlink Gateways."
  • DNSLink points at /ipfs/<cid>, not /ipns/<k51…>. w3name records aren't DHT-published, so the IPNS name doesn't resolve on public gateways (documented in cloudflare/README.md). Hence the "re-paste the hash after each regenerate" step — with a redirect-rule alternative for anyone who'd rather not.

Things found by actually doing it

  • Creating a gateway 409s with code 1013"A DNS record (A or AAAA) with a name matching the provided hostname already exists" — and the dashboard button appears to simply do nothing. This is why the guide recommends a fresh subdomain and documents the fix.
  • Cloudflare refuses example.com and other domains you aren't associated with, so a sample zone can't be staged.
  • The apex redirect uses Cloudflare's "Redirect to a different domain" rule template — the user edits two boxes and leaves the rest. The expression was validated in the real form (preview resolved to (http.host eq "yourdomain.com")).

Not included

No YouTube link: everything findable predates the Aug-2024 gateway shutdown and would actively mislead.

Dashboard screenshots are desktop-width only — the browser tooling reports resize success but keeps capturing at 1506×816, so phone-width captures weren't possible. Easy follow-up if wanted.

Also worth a follow-up: Step 1 is the one step with no screenshot, because the new app UI isn't deployed yet. Once this is live it can be captured and added.

Heads-up

A gateway site.example.com (1 of 15) now exists on the example.com zone in the Cloudflare account. It's inert — that zone is pending and never resolves — and is worth keeping for future re-screenshots, but delete it any time.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G3971DnvQ8oVL3GAha4BRv

ehsan6sha and others added 2 commits August 31, 2026 11:16
Two halves of the same feature: letting people put a generated FxFiles
website on their own domain.

App (web only). `_stableLinkSection` gains a "Use your own domain" block
showing the live site's CID with three actions: copy the raw hash, copy
the ready-to-paste `/ipfs/<cid>` DNSLink value, and open the guide. It
reads `pointer.currentCid`, so it stays consistent with the shareable
link above it and renders a "publishing..." line instead of a stale
hash. The screen already rebuilds on WebWebsiteService notify, and
`_notify()` fires after `publishLatest()` resolves, so the row refreshes
itself once a regenerate publishes.

Guide. `site/domain/` -> https://files.fx.land/domain. Two entry paths
(buy at Cloudflare / already own a domain elsewhere), then a shared
walkthrough of Cloudflare's Web3 IPFS DNSLink gateway, how to update the
hash after regenerating, and a troubleshooting section.

Screenshots are real captures of the live dashboard, cropped to the
relevant region and redacted (account email, zone/account IDs).

Notes on the technical choice:
- Cloudflare shut down its public IPFS gateway on 2024-08-14, so the old
  cloudflare-ipfs.com CNAME advice is dead. The Web3 DNSLink gateway is
  the current path and is on the free plan (15 gateways, 50 GB included).
- DNSLink points at /ipfs/<cid>, not /ipns/<k51...>: w3name records are
  not DHT-published, so the IPNS name does not resolve on public
  gateways (see cloudflare/README.md). Hence the "re-paste after each
  regenerate" step, plus a redirect-rule alternative for people who
  would rather not.
- Gateway creation 409s with code 1013 when an A/AAAA record already
  holds the hostname; documented in troubleshooting since the dashboard
  fails silently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3971DnvQ8oVL3GAha4BRv
…r on mobile

Dashboard captures are desktop-width only, so say so up front and tell phone users where the side menu went (tap the hamburger) at the one step that depends on it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01G3971DnvQ8oVL3GAha4BRv
@ehsan6sha
ehsan6sha merged commit 9d7d4f0 into main Aug 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant