Blog home

How To Link Your ENS Domain to your IPFS Website

Pinata

Published on

4 min read

How To Link Your ENS Domain to your IPFS Website

What does it really mean to ‘decentralize’ your website? Many of you are familiar with the term, but what does it mean for a page that people access through a standard HTTP browser?

In a word, control. Control over the decision to let your website persist. Control over who can and cannot access it. And control over its secure existence, rather than waiting for yet another high-profile server hack that could compromise your hard work and sensitive data.

If you’ve already successfully deployed your website to IPFS and are ready to take it a step further, this tutorial will show you how to resolve your ENS domain to your website CID, so that registering domains on platforms like GoDaddy or Google Domains become a thing of the past.

First, let’s talk about what ENS is and why it matters.

What is ENS?

ENS (Ethereum Name Service) is your web3 username. It’s the web3 equivalent to DNS (Domain Name System), which is the standard for how all browsers load websites. ENS lives entirely on the Ethereum blockchain as a decentralized service to address resources.

Just as DNS converts human-readable names to IP addresses, ENS converts human-readable names to Ethereum addresses. And just as IPFS solves some of the key pain points from HTTP, ENS aims to resolve some of DNS’s problems, such as man-in-the-middle attacks and scalability.

To get and use your own ENS, you’ll need to sign a unique smart contract, and set resolver records to them to link to your wallet address. Here’s everything else you’ll need for this tutorial:

Prerequisites

  • A Pinata account
  • An ENS Domain (get one here)
  • A Browser Wallet (e.g. Metamask)
  • A wallet with some ETH available
  • A website deployed on IPFS via Pinata (via this tutorial)

Step-by-Step Guide

Your ENS Dashboard

Let's get to linking. To get all nice and settled in, let’s first take a closer look your ENS dashboard 🕶️.

Head over to https://app.ens.domains/ and connect the wallet with your ENS domain.

Once connected, click on ‘Profile’ on the avatar dropdown menu.

On your ENS Profile dashboard, you’ll be able to see all the below tabs. Click into ‘Records’, and navigate to the ‘Other’ tab.

Populate the Content Hash Field

Alright, Pinnie time. Go ahead and log into your Pinata account.

From your dashboard, click into your pinned website folder, and copy the IPFS URL. The format should be like this:

https://[your-gateway]/ipfs/[your-cid]

Copy that URL and go over to your ENS account dashboard. Paste it into the ‘Content Hash’ field and click ‘Save’.

Confirm Details

A pop-up modal will appear, prompting you to double check your details before confirming in your wallet. Make sure to double check that you’ve got the right wallet and the right URL.

Click ‘Open Wallet’ and sign the transaction (you will need to pay a small fee to make the change). Once complete, you can now navigate to [your-ens].ens/ and there you will see your CID content 😎.

That’s it! Now you have a fully decentralized website — deployed on IPFS, and named with a decentralized name service 🏄🏼‍♀️.

Next Steps

From here, the possibilities are endless. You can start sharing your website to your audience, or, if you’re like me, you can take what you’ve learned and create another, way more complicated website that scratches that insatiable itch of being a builder.

The benefits of building and deploying your website on IPFS are many. If you're interested in knowing more about why it's such a big deal, check out this article by Cynthia Taylor to read more on the problems with DNS. And if you need a refresher on how to deploy your IPFS website, open up the main tutorial in a new tab to help you along as you build.

With Pinata and ENS, you can add your own creative flavor with your tools of choice. If you have any doubts or questions along the way, feel free to reach out to our team on Twitter, Discord, Threads — or whichever social platform takes your fancy 🤌🏼.

Happy pinning!

Stay up to date

Join our newsletter for the latest stories & product updates from the Pinata community.

No spam, notifications only about new products, updates and freebies. You can always unsubscribe.