Most dApps have a split personality. The smart contract logic may be immutable and unstoppable on chain, but the user facing interface is often a point of failure. Many teams still ship that interface from traditional web hosting services like AWS or Vercel. Those platforms are centralized. They can be censored or de-platformed.
The fix is to treat the frontend as static content and the stable address as a separate layer. The InterPlanetary File System stores your HTML, CSS and JavaScript by what the files contain, not where they live. A naming layer then points users to the latest release. Pinning keeps that release online. When you understand that split, updates stop breaking links.
Why a CID changes everything about deploys
Traditional web hosting relies on centralized servers controlled by single entities. That creates points of failure and censorship. Decentralized front end hosting uses a peer to peer network to store and serve static files.
IPFS addresses content by its cryptographic hash, called a Content Identifier or CID. It ensures immutability and availability from any node in the network. Your application remains accessible as long as it is pinned by at least one node.
IPFS works by splitting files into content addressed blocks. When you upload static assets, they receive a unique CID. Anyone can then pin these files to a local IPFS node. That creates redundant copies across the network. Users resolve the CID through a public gateway or a local node. The frontend is served from a distributed network of peers rather than a single server.
This is why IPFS frontends are resistant to takedowns. Content cannot be tampered with once uploaded. Multiple peers can serve the same file. Users can get faster access through cached content across nodes. It aligns with core principles of user sovereignty.
There is a tradeoff. Each new build generates a new CID. If users bookmark the gateway URL like https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco, that link points to one frozen release. Ship a fix and you get a different hash. The old link does not move forward. The old version remains accessible via its original CID, which gives you a versioned history. But it also means you need a stable pointer if you want repeat visits to land on the current version.
Build the frontend so it survives content addressing
Before deploying, ensure your development environment and project are properly configured. You will need a foundational understanding of web development and the command line. Familiarity with HTML, CSS and JavaScript is essential, as IPFS hosts static files.
Experience with a modern front end framework like React, Vue or Svelte is highly recommended, as most dApp interfaces are built with these tools. Ensure you have Node.js v18 or later and npm or yarn installed to manage project dependencies and run build scripts. Your smart contract interaction logic must be provider agnostic.
First, build your dApp into static files using a framework like React or Vue.js. The output is a directory with an index file plus assets. If you are using Vite, build the site with relative asset paths. Gateways serve your site under /ipfs/<CID>/, so the default absolute paths like /assets/… would not load.
Run this command in your Vite project:
pnpm vite build –base=./
The output is in the dist directory. Alternatively, set base: ‘./’ in vite.config.ts. Test that build locally before you publish. Open it through a gateway path, not just your dev server. Path issues only show up when the app lives in a subdirectory.
Publish locally first, then pin for the world
There are multiple third party IPFS providers, but it is best to start with running IPFS locally for testing. Install the IPFS user interface and create a directory with your web site.
In IPFS Desktop, click Import and then Folder and select the directory you created. Select the folder you just uploaded and click Rename. Give it a more meaningful name. Select it again and click Share link. Copy the URL to the clipboard. The link would be similar to https://ipfs.io/ipfs/QmaCuQ7yN6iyBjLmLGe8YiFuCwnePoKfVu6ue8vLBsLJQJ.
Public gateways such as ipfs.io are rate limited and may block some content, so use your local gateway for testing. Click Status. Expand the Advanced tab to see the gateway address. For example, the address may be http://127.0.0.1:8080. Combine the path from the link step with the gateway address to find your address. For the example above, the URL is http://127.0.0.1:8080/ipfs/QmaCuQ7yN6iyBjLmLGe8YiFuCwnePoKfVu6ue8vLBsLJQJ. Open that URL in a browser to see your site.
Using the command line tool or a service like Pinata or Fleek, you can also upload the build directory to IPFS. The upload returns a unique CID. Your dApp is now live at a gateway URL, but this hash based address is not user friendly.
Local availability is not enough. To make files available when you are offline, you need persistent pinning. Use a pinning service to ensure your files are stored on multiple IPFS nodes. For high availability, store copies on more than one node.
There are a number of well known pinning services. Whichever service you use, you need to create an account and provide it with the CID from IPFS Desktop. Services like Pinata IPFS hosting or Fleek dApp hosting simplify this process. Fleek automates IPFS and Filecoin deployments with CI and CD pipelines.
Filecoin works alongside IPFS. It offers decentralized storage markets where users pay to keep data alive long term. This makes it ideal for dApp frontends that need guaranteed persistence. Beyond IPFS, some teams also look at Arweave for permanent storage. Arweave provides permaweb hosting, where files uploaded once are stored for long periods.
Keep one stable address while CIDs change
This is the core workflow. You cannot stop CIDs from changing. You add a small mutable pointer that you control. Then every release is the same three steps. Publish, pin, move the pointer.
Option 1: DNSLink
Use IPNS or DNSLink to create human readable, updatable links for your dApp. DNSLink stores the current CID in a DNS TXT record. Users and gateways resolve your domain to whatever CID you list. When you ship a new build, you update that record. The domain stays the same. The content behind it moves forward.
Option 2: IPNS
IPNS provides a mutable name that can point to different CIDs over time. It is useful when you do not want to touch DNS on every release. You publish the new CID under the same IPNS key. Users who follow that key get the latest version without learning a new hash.
Option 3: ENS
The Ethereum Name Service maps human readable names like myapp.eth to machine readable identifiers. You can purchase a .eth domain and set its ContentHash record to point to your IPFS CID. Once configured, users can access your dApp via a compatible browser like Brave or a public gateway at myapp.eth.limo. This combines decentralized hosting with a memorable, persistent web address.
All three options solve the same problem. The CID proves which exact files the user received. The pointer tells the user where to look for the current release. Keep both visible in your release notes. Record the expected network, contracts or programs, and runtime services alongside the release CID.
A repeatable update workflow
Maintenance involves updating your dApp. Use this sequence so updates do not break links or leave unpinned releases.
- Build clean. Generate a fresh static build with relative paths. Confirm the app loads from a gateway style subpath.
- Upload the folder, not loose files. Upload the full build directory to IPFS via CLI, Desktop, Pinata or Fleek. Save the new CID. Keep the old CID in your changelog for rollback.
- Pin before you announce. Pin the new CID on your own node and on a persistent pinning service. Verify it loads from a public gateway and from a local gateway.
- Move the stable pointer. To update, upload the new files, obtain the new CID, and update the ContentHash record in your ENS manager, or update your DNSLink TXT record or IPNS entry. Do this only after pinning succeeds.
- Check wallet and network behavior. Since your front end is served from a different origin such as an IPFS gateway, you must handle provider injection carefully. Use window.ethereum detection and consider libraries like Web3Modal or Wagmi that are designed for dynamic environments. Your smart contract interactions remain unchanged, as they connect to the blockchain via RPC providers, independent of the front end hosting location.
- Keep the old release pinned during transition. Cached gateways and direct CID links may still serve the prior version. Unpin only when you are sure no active pointer uses it.
What IPFS does not fix
A dApp frontend can be delivered through IPFS while its live behavior still depends on wallets, network services and blockchain programs. Make every boundary visible. The files distributed through IPFS describe and implement the browser interface. Ethereum contracts or Solana programs execute within their respective networks, not inside IPFS. A frontend release may include public configuration, but it does not include the entire operating state of the application.
IPFS does not run smart contracts. In this architecture IPFS distributes the frontend and public assets. Contract or program execution belongs to the chosen blockchain network. A frontend CID does not prove that a dApp is safe. It identifies a content release, not its correctness, contract security or the trustworthiness of runtime services.
Let a visitor understand the application without connecting a wallet. Explain the supported network and the action the application enables before asking for authorization. Connection, signing, approval and submission should have distinct states and accurate labels. A rejected request should leave the interface usable instead of reopening a prompt until the visitor accepts.
Treat browser origin as a design input. Application behavior can depend on the origin under which a page is served. Storage, permissions, wallet interaction and API restrictions deserve testing on the intended hostname. Shared path gateways and origin isolating gateway arrangements are not interchangeable browser contexts. Define a supported delivery route and test it rather than assuming local development success transfers everywhere.
Test failures that static hosting cannot solve. An unavailable RPC endpoint is different from a missing script. A returned transaction identifier is different from an observed successful outcome. Handle wrong networks, rejected requests, uncertain submission states and unavailable observers explicitly. Keep administrative tokens and signing secrets out of the public bundle, and use appropriate test environments before a production release.
Host the interface on IPFS. Pin every release. Point users to a name you can update. That pattern gives you censorship resistance without link rot. The CID keeps each release verifiable. DNSLink, IPNS or ENS keeps the entry point stable. Pinning keeps both reachable.




