Domain Resolution allows developers to translate a
.zil domain name into addresses for BTC, ETH, IPFS, and more. Domain Resolution can (and we believe, should) be used anywhere your application has a "Send to: " field.
To make domain resolution easier, we've written libraries for web, Android, and iOS.
If you're familiar with blockchain development and would rather avoid an additional dependency in your application, you can also read domain metadata directly.
Given a blockchain domain has a DNS record configured. When the user enters the domain name into a browser address bar, the browser resolves the domain and gets the specified DNS records. Then, the browser requests and displays the content using DNS protocol and HTTP protocol.
Given a blockchain domain has a d-web content identifier record configured (e.g.: an IPFS hash). When the user enters the domain name into a browser address bar, the browser resolves the domain and gets the content hash of a domain. Then, the browser retrieves the content by the hash using a related protocol and displays the content.
Given a blockchain domain has both a redirect URL and IPFS hash configured, and the user's browser doesn't support IPFS protocol. When the user enters the domain name into a browser address bar, the browser resolves the domain and gets both the redirect URL and IPFS hash records. Then, the browser redirects the user to the redirect URL because the IPFS protocol is not supported.
To change ETH provider services, the user goes to Browser Settings > Crypto Domains section:
User changes the Ethereum node URL from default to another.
User changes Registry Address for each support crypto registry.
User changes network for Ethereum node.
User changes DNS gateway
User changes Dweb gateway
Then, the browser uses the new settings to make requests to Ethereum blockchain:
If the network is not specified explicitly, it can be retrieved from the Ethereum node URL.
If the Registry Address is not specified, it can use a default for the specified network
In addition to base browser hypermedia protocols like
http, blockchain domains can also be configured for distributed content protocols like
ipfs. These hypermedia protocols can be associated with a crypto domain:
A browser may support any subset of traditional or distributed protocols that still make crypto domain websites displayable.
While it is possible to resolve a domain via a call to ETH RPC and support distributed content protocols in a browser, it might be easier to make those calls via gateways using protocols already supported by all browsers: HTTP and DNS. A gateway may simplify the integration to a browser but comes at the downside of decreased decentralization (if the gateway is hosted by a third party) or a more complex user experience (if the gateway is hosted by the user).
There are 2 possible gateways for each problem:
Distributed content (Dweb) gateway
Resolution over DNS gateway
See a description of how they work below
A gateway is an HTTP Server that acts as a proxy between HTTP and a distributed content protocol. Basic functionality of such a gateway:
Receive HTTP request to a blockchain domain (like
Resolve the domain into crypto records
Get the content based on Browser resolution algorithm
Return the content to the client via HTTP
A gateway is a DNS Server that resolves not just traditional domains but also
.crypto domains. Basic functionality of such a gateway:
Receive a domain resolution request
Resolve a domain using classical DNS system if is in classical TLD (like
Resolve a domain using Browser resolution algorithm if it is in crypto TLD
If a domain is set using DNS, transform Crypto DNS records into classical records
If a domain is set using distributed content
If the client requests
A record, resolve to Distributed content gateway IP Address
If the client requests a
TXT record, resolve to all crypto records in JSON encoded key-value format
Send resolution to client