ENS Logo

Hosting a Decentralized Website

🚧 This page is work in progress 🚧

🏗️👷This page is still under construction. Check back at a later date to see more!

ContentHash

The ContentHash is a very popular component of an ENS name, first introduced in ENSIP-7. It can be queried by hitting the contenthash(bytes32) function on a name's resolver. You can also set the contenthash on a name if the resolver supports it.

ipfs://qMhx...bzz:/2477ar://HGa8...

Hosting & Pinning

When it comes to hosting your files there are many options to choose from.

IPFS / FilecoinSwarmArweave

Popular options include IPFS, Swarm, and Arweave. Depending on what option you go with your files are either permanently stored on a network, or require to be actively stored on at least one machine, also known as "pinning".

Deploy your site

Several helpful tools and platforms exist that you can use to deploy your website to IPFS, Swarm, or Arweave. Most notably fleek, Pinata, and Blumen. Helping you easily deploy your website to a decentralized storage network.

Setting your ContentHash

If you are using the public resolver (the default for names registered using the ENS Manager App), you can set the contenthash directly from within the ENS Manager App.

If you are using a custom resolver, or are writing your own resolver you will be able to have more fine grained control over the contenthash field. See ENSIP-7 for more information on the contenthash field.

Browser Support & Gateways

In the ideal world every browser supports decentralized websites out of the box. If you are using MetaMask or Brave Browser you can already access IPFS websites directly. On non-conforming browsers you can use a gateway such as eth.link or eth.limo to access your website. You can test if your browser supports decentralized websites by visiting ens.eth or use a gateway via ens.eth.link.

Contributors
Last Modified
27 days ago