You made a website in FxFiles. Right now it lives at a long link. This page shows you
how to put it on yourdomain.com instead — using Cloudflare, on their free plan.
The pictures below are from Cloudflare on a computer. On a phone it is the same screens in one column — tap ☰ at the top left wherever these steps mention the side menu.
Open your website in FxFiles on the web, and find the Use your own domain box under the shareable link. Tap Copy link value for Cloudflare — that copies a line that looks like this:
/ipfs/bafybeiejegeowlh5warqnrjjmhbkf7hdjaiuhnpqajbktx6ta77urqmljy
Keep it on your clipboard. You will paste it once, near the end.
It is your website's address on IPFS — the storage network FxFiles publishes to. It is not a secret, and it changes every time you regenerate the site. Step 4 covers how to update it.
Pick the one that matches you:
Create a free account at cloudflare.com, then type the domain you want in the Add a domain box on the home page.
Press Buy, fill in your contact details, and pay. A .com is usually around $10–12 a year; other endings vary a lot.
A domain bought at Cloudflare is already connected to Cloudflare. There are no nameservers to change. Go straight to Step 3.
Your domain stays where you bought it. You are only changing who answers DNS for it — that becomes Cloudflare. Start by creating a free account at cloudflare.com and typing your domain into Add a domain.
Press Connect. Leave the suggested options as they are and press Continue. Cloudflare copies your existing DNS records across so your email and any current website keep working.
Cloudflare shows you two nameservers. Copy them both.
Then log in where you bought the domain, find the Nameservers setting, delete what is there, and put Cloudflare's two in instead. Here is that screen at the common registrars:
If DNSSEC is enabled and you change nameservers without disabling it first, your domain can go completely offline. If you have never heard of DNSSEC, it is almost certainly already off — but it is worth a look.
Cloudflare then needs to see the change. That is usually well under an hour, but the official window is up to 24 hours. You will get an email when your domain goes Active. Wait for that email before doing Step 3.
In Cloudflare, click your domain, then scroll to the bottom of the left-hand menu and choose Web3. Press Create Gateway.
There is no side menu on a narrow screen — tap the ☰ button at the top left to open it, then scroll down to Web3. Everything else is identical to the pictures below, just stacked into one column.
Fill in three things:
site.yourdomain.com./ipfs/… line you copied in Step 1.
That's it. Cloudflare creates the DNS records for you and issues the HTTPS certificate.
A subdomain is easiest — site.yourdomain.com, blog.yourdomain.com,
anything you like. Nothing else is using it, so it just works.
To use www.yourdomain.com, first go to DNS → Records and delete any
existing A or AAAA record named www. Cloudflare refuses to
create the gateway while one is in the way.
To make the bare yourdomain.com work too, set the gateway up on
www (or your subdomain), then add a redirect — see below.
yourdomain.com work
The gateway lives on a subdomain, so someone typing just yourdomain.com
won't land on it. Cloudflare has a ready-made rule for this — you only change
two boxes.
1. In your domain, click Rules in the left menu. You'll see a grid of Rule templates. Find Redirect to a different domain and press Create from template.
2. The form opens already filled in with example values. Change these two, and leave everything else exactly as it is:
yourdomain.com
concat("https://site.yourdomain.com", http.request.uri.path)
3. Press Deploy. That's it.
www for your gateway instead?
Then skip all of the above and use the Redirect from root to WWW template in that same grid. It needs no editing at all.
DNS → Records lists everything for your domain. This is also where you delete a
conflicting www record before creating a gateway on www.
Every time you regenerate the site in FxFiles it gets a new IPFS address, and your domain keeps serving the old one until you tell it otherwise. Updating takes about thirty seconds:
Then skip the gateway entirely and use a redirect instead. Your FxFiles
shareable link (the fxfiles.top/w/… one) always points at your
newest version by itself, so it never needs updating.
Set it up the same way as the rule above — Rules → Redirect to a different domain → Create from template — but put your shareable link in the Expression box instead:
concat("https://fxfiles.top/w/YOUR-LINK-ID", http.request.uri.path)
The trade-off: visitors get moved to the fxfiles.top address, so
that is what shows in their address bar — not your domain. Nothing to maintain, but
it is not really "your" domain any more.
Deploy does nothing, or the gateway never appears
A DNS record (A or AAAA) with a name matching the provided hostname already exists.
Something already answers for that hostname. Go to DNS → Records, delete the
A and AAAA records with that exact name, then create the gateway
again. Or just pick a hostname nothing is using, like site.yourdomain.com.
This is the most common failure, and it is silent — the button simply appears to do nothing.
Cloudflare won't let me add my domain
This web property cannot be added to Cloudflare at this time.
Cloudflare blocks domains you are not associated with, and reserved names like
example.com. Use a domain you actually own.
My gateway says "Pending" and won't turn active
Pending means Cloudflare is not yet answering DNS for your domain. Finish the nameserver switch in Step 2 and wait for the "domain is active" email. A gateway on a domain that never completes that step will stay Pending forever.
My domain went offline after changing nameservers
Most likely DNSSEC was still enabled at your registrar. Turn DNSSEC off there, then wait for DNS to settle. See Cloudflare's guide.
My domain shows an old version of my site
The IPFS address changed when you regenerated. Redo Step 4. If you just updated it, give it a couple of minutes and try a private window.
I followed an old tutorial and it doesn't work
Guides written before August 2024 tell you to point a CNAME at
cloudflare-ipfs.com. Cloudflare
shut that gateway down
on 14 August 2024. Use the Web3 page as described here instead.