I recently registered a .eth domain through the Ethereum Name Service. Is it possible to use this domain for a website? Or is it just an alias for an ethereum address (and other metadata)?
.eth Domain from ENS – Can It Be Used for a Website?
ens
ens
I recently registered a .eth domain through the Ethereum Name Service. Is it possible to use this domain for a website? Or is it just an alias for an ethereum address (and other metadata)?
Best Answer
Yes, but AFAIK not all the browsers resolve
.eth
domains automatically, you'll need a gateway.About your question, it's is possible to link a website with a ENS domain if you link the web content with your
.eth
domain. You can do it with IPFS or Swarm but in this case I'm going to focus on Swarm, so:About Swarm
From the Swarm docs:
About ENS
From the ENS docs:
Using the function
setContenthash
:Where:
Once you own the
eth
domain and doing some steps like setting the resolver:Introduce your IPFS (or Swarm) hash and you will see the following:
IPFS
I've found the following tutorial that will illustrate more easily how to do what you ask with IPFS.
Tutorial about hosting a Dapp using IPFS and ENS
Swarm
Then you can use the Swarm gateway and browse to your web like that:
https://swarm-gateways.net/bzz:/yourdomain.eth/
You can try (probably gives error but if you reload it will work):
https://swarm-gateways.net/bzz:/theswarm.eth/
For your interest, you can test all the process using
.test
ENS names in a testnet like Ropsten or Rinkeby to see how it works. You can read more about here.