Back

Blog details

How to Host a Static Website on IPFS (and Why Pin It)

AIOZ Network
5 min readSeptember 30, 2026
aioz-pin

Hosting a static site on IPFS looks deceptively simple in most tutorials: add a file, get a link, done. What those tutorials usually skip is the part that actually determines whether that site is still reachable next month. This article covers the full picture, from files to CID to a real, memorable URL, and the one step most quick-start guides leave out entirely.

TL;DR:

  • Hosting a site on IPFS means adding its files, which produces a CID, and everything else, access, persistence, a real domain, builds on top of that one identifier
  • IPFS's own documentation is direct about the gap this creates: "IPFS nodes treat the data they store like a cache," with no guarantee it stays available on its own
  • A gateway is what makes the site loadable in a normal browser; DNSLink is what turns a raw CID into a real, memorable domain name
  • Single-page apps need one extra consideration: client-side routing doesn't work the same way as it does on a traditional server, worth checking before assuming a React or Vue app will "just work"
  • AIOZ Pin covers the two pieces a bare IPFS upload doesn't: guaranteed pinning so the site doesn't quietly disappear, and a dedicated gateway that isn't subject to shared public rate limits

What "Hosting on IPFS" Actually Means

There's no server to configure and no hosting account to set up in the traditional sense. Hosting a static site on IPFS means adding its files, index.html, CSS, JS, images, to the network, which produces a CID for the whole directory. That CID is now the site's permanent address: anyone with it can retrieve every file inside, reconstructed exactly. Everything past that point, how someone actually reaches the site through a browser, whether it stays available, whether it has a real domain, is a separate set of decisions layered on top of that one CID.

The Gap Most Quick-Start Guides Skip

IPFS's own guides are refreshingly honest about a specific limitation: "IPFS nodes treat the data they store like a cache, meaning that there is no guarantee the data will continue to be stored." A file added through a local node or a temporary tool can be added successfully, resolve correctly for a while, and then quietly become unreachable once nothing is actively keeping it around anymore. This is the exact problem pinning exists to solve, and it's worth treating as a required step, not an optional add-on, for any site meant to still be live next month.

Making It Loadable in a Normal Browser

A raw CID isn't something most visitors will ever see directly. A gateway translates a request for that CID into a standard HTTP response, so a normal browser loads the site the way it would load any other page, no special software required on the visitor's end. This series covers gateway mechanics, including the meaningful difference between a shared public gateway and a dedicated one, in full elsewhere; the short version relevant here is that gateway choice affects real-world reliability under actual traffic, not just whether the site technically loads once.

Giving It a Real Domain

A 46-character CID in the address bar isn't what most projects want visitors to see. DNSLink solves this by pointing a normal-looking domain at the site's current CID through a DNS TXT record, so visitors see a real, memorable domain instead of a raw gateway URL. Because DNSLink resolves independently of who's actually pinning the content, it also means the underlying CID can be updated (a new build, a bug fix) without visitors needing a new link, as long as the DNS record gets updated to match. Pairing DNSLink with an IPNS name, rather than pointing directly at a fixed CID, is the more flexible version of this same pattern, since it avoids touching DNS on every single deploy.

The Single-Page App Caveat

Traditional multi-page sites work on IPFS exactly as expected: each path corresponds to an actual file. Single-page applications, the kind built with React, Vue, or similar frameworks that handle routing client-side, need extra consideration. IPFS's own documentation flags this directly: basic hosting doesn't handle SPA-style routing, and projects needing it should look into redirects and custom 404 handling specifically, rather than assuming a client-side router will behave the same way it does on a conventional web server. Worth checking before deploying, not after a broken deep link gets reported.

Where AIOZ Pin Fits

Everything above describes the mechanism; AIOZ Pin is one concrete way to run it in production rather than assembling each piece manually. Uploading a site's build directory through pinFolderToIPFS() handles both gaps a bare IPFS add leaves open: the content gets pinned, not just cached, so it doesn't quietly disappear the way an unpinned upload can, and it becomes reachable through AIOZ Pin's dedicated gateway, which isn't subject to the rate limits a shared public gateway enforces under real traffic. DNSLink still sits on top as an independent step, since it's a general IPFS technique that doesn't require AIOZ Pin's involvement, but the pinning and gateway layer underneath it is exactly what a production static site actually needs to stay reliably online.

Frequently Asked Questions

Do I need to run my own IPFS node to host a website on it? No. Uploading through a pinning service's SDK, API, or desktop tool handles adding the files and producing a CID without requiring you to run or maintain node infrastructure yourself.

Why does a site I uploaded to IPFS sometimes stop loading later? Because IPFS nodes treat stored data like a cache by default, with no guarantee it stays available. If nothing is actively pinning the content, it can become unreachable once whatever originally hosted it stops.

How do I get a real domain instead of a raw CID for my IPFS site? DNSLink, a DNS TXT record that points a normal domain name at the site's current CID (or at an IPNS name, for a version that doesn't need updating on every deploy).

Does a React or Vue single-page app work on IPFS out of the box? Basic static hosting doesn't handle client-side routing the way a traditional server does. Check IPFS's redirects and custom-404 guidance specifically before assuming deep links will resolve correctly.

What does AIOZ Pin add on top of a basic IPFS upload? Guaranteed pinning, so the site doesn't quietly disappear once nothing else is hosting it, and a dedicated gateway that isn't subject to shared public rate limits under real traffic.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

IPFS Dedicated Gateway Free vs Paid Plans on AIOZ Pin

An IPFS dedicated gateway on AIOZ Pin is called a premium gateway. See what the free plan limits, what a paid plan adds, and what happens at zero balance.

6 min readOctober 28, 2026
blog thumbnail

Pin by CID on IPFS Without Re-Uploading Your Files

Pin by CID asks a pinning service to fetch content already on IPFS and keep it. Covers the AIOZ Pin pinByHash call, statuses, and why a pin stalls on Pinning.

6 min readOctober 26, 2026
blog thumbnail

IPFS Gateway Not Working? Diagnose It in This Order

IPFS gateway not working? Read the status code first, then check the CID, your request rate, and whether anyone is providing the content. Here is the order.

6 min readOctober 23, 2026
blog thumbnail

ERC-1155 Metadata on IPFS: The ID Substitution Rule

ERC-1155 metadata on IPFS breaks when filenames ignore the {id} rule. Here is the exact 64-character format, a working folder layout, and the per-token option.

6 min readOctober 21, 2026
blog thumbnail

AIOZ Pin Rate Limits: API, Public, and Premium Gateways

AIOZ Pin rate limits in one place: 180 requests per minute for the API, 15 per CID on the public gateway, and no predefined limit on premium gateways.

6 min readOctober 19, 2026
blog thumbnail

IPFS Pin Stuck on Pinning? What Each Pin Status Means

IPFS pin stuck on Pinning? Here is what Pinning, Pinned, and Failed mean on AIOZ Pin, why big directories can sit there, and how to read a pin's real state.

6 min readOctober 16, 2026