ENS (.eth) Browser Support

One of the main inspirations for 3bra was the realization that:

Everyone has .eth domains but you can't you point them at anything!?

Turns out, there's a field on your ENS domain called the Content Hash which you can use to point at a file on IPFS! Cool, another rabbit hole to explore.

IPFS

IPFS is the Interplanetary File System. Files on IPFS are immutable, meaning they can never be changed. So if you enter an IPFS file in the Content Hash field of your ENS domain, you need to update your ENS records (which costs gas) every time you make a change to that file! Case in point, Vitalik hosts his blog on IPFS, and every time he writes a new blog posts and links to it from his homepage, he updates vitalik.eth to point to his updated homepage.

There must be a better way! And there is...

IPNS

We also have IPNS or the Interplanetary Name Service. IPNS names point at a file on IPFS, and you can update which file it points at without changing the name! This is what 3bra does, and what Vitalik probably should be doing...

IPFS files and IPNS names are long ugly hashes. Here's 3bra's current IPFS file and the IPNS name that points to it:

ipfs://bafkreiaflra6e6y6svtxsasou4n6hh7duu6rtrpavx6yqqqbeoqyhtzamy

pns://k51qzi5uqu5dk2xevkxykx4smhsfq0cdht1v0or63jbehkzf49o7tjs4ipdomt

There must be a better way! And there is...

DNSLink allows you to add a TXT record to any domain name that points to a file on IPFS. All you have to do is update the TXT record when you want to point at a new file! And the best part is, DNSLink is supported by IPNS. This is how uniswap.eth does it. In their Content Hash field on ENS they have:

ipns://app.uniswap.org

Now we're talk'n! Except unfortunately the ENS app no longer supports DNSLinks in the Content Hash field for security reasons. Uniswap did this before support for DNSLink was removed, which is why it still works.

ENS Support

Ok, now you know some important stuff about IPFS, but just because you can point your ENS domain (.eth) at a file on IPFS doesn't mean that all browsers support it. Some do, some don't and there's some work arounds. Eventually they all will (because Web3 will be 1,000x bigger than Web 2.0!) but for now let's test every option available to see what works.

On one hand we're testing for IPFS support, but what we reallllly care about at 3bra is ENS support. It's not always the same thing. You can still display IPFS content via an HTTP gateway like dweb.link, but if the ENS name is not maintained in the URL (or accessible via javascript), 3bra can't detect which profile to display, making this issue near and dear to our hearts.

Testing For ENS Support

So let's test all the major browsers (and extensions) for ENS support. We tested three different ENS names which utilize each of the three formats in their Content Hash field:

  1. vitalik.eth which points at an ipfs:// hash:
    • ipfs://bafybeic3y6oc2dai3uypyyuaggp4xx3krocpgzbwst2z4ha73jdh7y6nea
  2. 3bra.eth which points at the 3bra ipfs:// key:
    • ipns://k51qzi5uqu5dk2xevkxykx4smhsfq0cdht1v0or63jbehkzf49o7tjs4ipdomt
  3. uniswap.eth which points at IPNS using DNSLink:
    • ipns://app.uniswap.org

And for each example, we test two ways:

  1. With no protocol declared
  2. With ipns:// declared

Opera Browser

Opera serves IPFS content via a gateway which defaults to dweb.link but can be changed in the settings. Even though they serve content through a gateway, they don't redirect the URL in the address bar to the gateway URL which is nice.

Desktop (Mac):
Version 90.0.4480.84 (arm64)

  • ✅ vitalik.eth redirects to ipfs://vitalik.eth and resolves
  • ✅ ipns://vitalik.eth resolves
  • ❌ 3bra.eth defaults to ipfs://3bra.eth and does not resolve
  • ✅ ipns://3bra.eth resolves
  • ❌ uniswap.eth defaults to ipfs://uniswap.eth and does not resolve
  • ✅ ipns://uniswap.eth resolves

Mobile (Android):
Version 71.3.3718.67322

  • ✅ vitalik.eth redirects to http://vitalik.eth but resolves
  • ✅ ipns://vitalik.eth redirects to https://vitalik.eth but resolves
  • ❌ 3bra.eth defaults to http://3bra.eth and does not resolve
  • ✅ ipns://3bra.eth resolves
  • ❌ uniswap.eth defaults to http://uniswap.eth and does not resolve
  • ✅ ipns://uniswap.eth resolves

Recommendations for Opera:

Desktop:

  • If no protocol is declared, default to ipns:// not ipfs://

Mobile:

  • If no protocol is declared, default to ipns:// not ipfs://
  • Don't switch ipns:// to https:// in the address bar

Brave Browser

Brave only supports IPFS on the desktop for now but says mobile is coming. Brave takes IPFS support to to next level by allowing you to choose between hosting a local IPFS node or using an HTTP gateway which defaults to dweb.link. We'll test both.

Desktop (Mac) Local Node:
Version 1.41.96 Chromium: 103.0.5060.114 (Official Build) (arm64)

  • ❌ vitalik.eth redirects to ipfs://bafybeic3y6oc2dai3uypyyuaggp4xx3krocpgzbwst2z4ha73jdh7y6nea/ and resolves but does not maintain the ENS domain in the URL
  • ✅ ipns://vitalik.eth resolves
  • ❌ 3bra.eth redirects to http://3bra.eth and does not resolve
  • ✅ ipns://3bra.eth resolves
  • ❌ uniswap.eth redirects to http://localhost:48084/ipns/bafyaad3bobyc45lonfzxoylqfzxxezy and does not resolve
  • ✅ ipns://uniswap.eth resolves

Desktop (Mac) Gateway:
Version 1.41.96 Chromium: 103.0.5060.114 (Official Build) (arm64)

  • ❌ vitalik.eth redirects to https://bafybeic3y6oc2dai3uypyyuaggp4xx3krocpgzbwst2z4ha73jdh7y6nea.ipfs.dweb.link/ and resolves but does not maintain the ENS domain in the URL
  • ✅ ipns://vitalik.eth redirects to https://vitalik-eth.ipns.dweb.link/ and resolves
  • ❌ 3bra.eth redirects to https://k51qzi5uqu5dk2xevkxykx4smhsfq0cdht1v0or63jbehkzf49o7tjs4ipdomt.ipns.dweb.link/ and resolves but does not maintain the ENS domain in the URL
  • ✅ ipns://3bra.eth redirects to https://3bra-eth.ipns.dweb.link/
  • ❌ uniswap.eth redirects to https://dweb.link/ipns/bafyaad3bobyc45lonfzxoylqfzxxezy and does not resolve
  • ✅ ipns://uniswap.eth redirects to https://uniswap-eth.ipns.dweb.link/ and resolves

Mobile (Android):
Brave 1.44.101, Chromium 106.0.5249.65

  • ❌ No IPFS support (yet)

Recommendations for Brave:

Desktop Node:

  • If no protocol is declared, default to ipns:// and leave the ENS domain in the address bar

Desktop Gateway

  • In every case, just redirect to https://$ensname-eth.ipns.dweb.link/

Mobile

  • If you don't want to support IPFS yet, you can still support ENS by just redirecting .eth domains to https://$ensname-eth.ipns.dweb.link/

MetaMask Extension & App

Believe it or not, MetaMask has some built in features for supporting ENS resolution in the browser! MetaMask is available for Chrome, Firefox, Brave, Edge and Opera so it could really help pickup the slack for some of the browsers we'll cover later. We tested the extension in Chrome, but it should work the same across all supported browsers.

Note: Unfortunately, it's hard to get Chrome to not just Google everything you put in the address bar. If Chrome keeps googling your ENS domain instead of redirecting, you can add a / to the end of the ENS name. For example: vitalik.eth/

Desktop (Mac):
Chrome Version 106.0.5249.91 (Official Build) (arm64)

  • ❌ vitalik.eth redirects to https://bafybeic3y6oc2dai3uypyyuaggp4xx3krocpgzbwst2z4ha73jdh7y6nea.ipfs.dweb.link/ and resolves but does not leave the URL in the address or make it accessible
  • ❌ 3bra.eth redirects to https://app.ens.domains/name/3bra.eth/details meaning it doesn't know how to handle IPNS
  • ❌ uniswap.eth defaults to https://app.ens.domains/name/uniswap.eth/details meaning it doesn't know how to handle DNSLink

Mobile (Android App):
Version 71.3.3718.67322

  • ❌ vitalik.eth redirects to this gateway https://cloudflare-ipfs.com/ipfs/QmUWvM2pXSMk8kFMDqDnskMnURePtayXUECMYfwUJYgbks/ and resolves but does not leave the ENS domain in the address or make it accessible
  • ❌ ipns://vitalik.eth redirects to this gateway https://cloudflare-ipfs.com/ipfs/QmUWvM2pXSMk8kFMDqDnskMnURePtayXUECMYfwUJYgbks/ and resolves but does not leave the ENS domain in the address or make it accessible
  • ✅ 3bra.eth redirects to this gateway https://cloudflare-ipfs.com/ipns/3bra.eth/ and resolves
  • ✅ ipns://3bra.eth redirects to this gateway https://cloudflare-ipfs.com/ipns/3bra.eth/ and resolves
  • ✅ uniswap.eth redirects to this gateway https://cloudflare-ipfs.com/ipns/uniswap.eth/ and resolves
  • ✅ ipns://uniswap.eth redirects to this gateway https://cloudflare-ipfs.com/ipns/uniswap.eth/ and resolves

Recommendations for MetaMask:

Desktop & Mobile

  • Just redirect all .eth addresses to https://cloudflare-ipfs.com/ipns/$ensname.eth/ and it will work beautifully

IPFS Companion Extension

IPFS offers a browser extension allowing you to interact with your IPFS node through your browser. Yes, you need to be running a node. Either IPFS Desktop app or a daemon via their command line tool, Kubo. Not ideal, I know. The extension works with Firefox, Chrome, Brave, Opera & Edge. We tested the extension in Chrome, but it should work the same across all supported browsers.

The extension has an "Experimental" setting called "Catch Unhandled IPFS Protocols". This is the piece we want, but changing the URI scheme defaults on a mac requires an app or configuring low level settings via Terminal. Not gunna do that. But at least the ENS names without the protocol in front of it work well.

Desktop (Mac):
Chrome Version 106.0.5249.91 (Official Build) (arm64)

  • ✅ vitalik.eth redirected to http://vitalik.eth.ipns.localhost:8080/ and resolved
  • ❌ ipns://vitalik.eth popup asking, "Open Brave Browser.app?"
  • ✅ 3bra.eth redirected to http://3bra.eth.ipns.localhost:8080/ and resolved
  • ❌ ipns://3bra.eth popup asking, "Open Brave Browser.app?"
  • ✅ uniswap.eth redirected to http://uniswap.eth.ipns.localhost:8080/ and resolved
  • ❌ ipns://uniswap.eth popup asking, "Open Brave Browser.app?"

Recommendations for IPFS Companion Extension:

  • Detect Google and Bing searches for ENS domains and re-direct them to http://$ensname.eth.ipns.localhost:8080/

Chrome Browser

No native support without Metamask or IPFS Companion extensions.

Desktop (Mac):
Version 106.0.5249.91 (Official Build) (arm64)

  • ❌ 3bra.eth googled 3bra.eth
  • ❌ ipns://3bra.eth popup asking, "Open Brave Browser.app?"

Recommendations for Chrome:

  • Redirect ENS domains to an HTTP gateway that supports IPNS like https://$ensname-eth.ipns.dweb.link/ or https://cloudflare-ipfs.com/ipns/$ensname.eth/

Firefox Browser

No native support without Metamask or IPFS Companion extensions.

Desktop (Mac):
105.0.2 (64-bit)

  • ❌ 3bra.eth googled 3bra.eth
  • ❌ ipns://3bra.eth opened URL in closest Brave browser window without asking

Recommendations for Firefox:

  • Redirect ENS domains to an HTTP gateway that supports IPNS like https://$ensname-eth.ipns.dweb.link/ or https://cloudflare-ipfs.com/ipns/$ensname.eth/

Edge Browser

No native support without Metamask or IPFS Companion extensions.

Desktop (Mac):
Version 106.0.1370.34 (Official build) (arm64)

  • ❌ 3bra.eth bing'd 3bra.eth LOL
  • ❌ ipns://3bra.eth popup asking, "Open Brave Browser.app?"

Recommendations for Edge:

  • Redirect ENS domains to an HTTP gateway that supports IPNS like https://$ensname-eth.ipns.dweb.link/ or https://cloudflare-ipfs.com/ipns/$ensname.eth/

Safari Browser

No native support or extensions.

Desktop (Mac):
Version 15.5 (17613.2.7.1.8)

  • ❌ 3bra.eth googled 3bra.eth
  • ❌ ipns://3bra.eth popup asking, "Open Brave Browser.app?"

Recommendations for Safari:

  • Redirect ENS domains to an HTTP gateway that supports IPNS like https://$ensname-eth.ipns.dweb.link/ or https://cloudflare-ipfs.com/ipns/$ensname.eth/

Conclusion

So that's where we stand. Ideally, there's a Web3 future where every browser is also an IPFS node (like Brave) and resolves ENS domains directly without redirecting to HTTP gateways. Obviously we're a ways off from that.

The best thing we can do is bring this to the attention of the browser and extension developers. If they've already made the decision to support IPFS and ENS, then I'm sure they'd want to improve it. And for those that don't, they'll do it if enough people ask.

Will keep this documented updated as things progress. LMK if there are any browsers/extensions missing from the list so we can test and recommend them.


By gerbz.eth on October 10th, 2022