3

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)?

3

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:

By registering a name and setting it to resolve to the content hash of the root manifest of your site, users can access your site via a URL such as bzz://theswarm.eth/.

Currently The bzz scheme is not supported in major browsers such as Chrome, Firefox or Safari. If you want to access the bzz scheme through these browsers, currently you have to either use an HTTP gateway, such as https://swarm-gateways.net/bzz:/theswarm.eth/ or use a browser which supports the bzz scheme, such as Mist https://github.com/ethereum/mist.

About ENS

From the ENS docs:

contenthash is used to store IPFS and Swarm content hashes, which permit resolving ENS addresses to distributed content (eg, websites) hosted on these distributed networks.

  • With Geth:

Using the function setContenthash:

function setContenthash(bytes32 node, bytes calldata hash) external;

Where:

node: namehash("yourdomain.eth") if you do it manually with a client like Geth or yourdomain.eth if you use ENS manager.
hash: e.g. the Swarm or IPFS hash of the content you’re referring

Once you own the eth domain and doing some steps like setting the resolver:

publicResolver.setContenthash(namehash("yourdomain.eth"), "hashOfYourContent", {from: eth.coinbase})
  • With ENS Manager (used Rinkeby testnet):

enter image description here

Introduce your IPFS (or Swarm) hash and you will see the following:

enter image description here

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/

enter image description here

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.

  • Answer updated to provide more information and organize it. – alberto Nov 13 at 20:52
  • Thanks! This isn't exactly what I wanted in terms of using an ETH domain like a regular web domain. But it's highly relevant, very interesting, and moving in the right direction. – sfmiller940 Nov 14 at 18:37
1

No it gives (sub)domain names to ETH addresses.

https://medium.com/@eric.conner/the-ultimate-guide-to-ens-names-aa541586067a https://docs.ens.domains/

  • I appreciate your point, but it's also possible to associate metadata with the address/subdomain. This seems to open many possibilities including something like a DNS record. – sfmiller940 Nov 13 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.