// resolve a CID from a TXT record in a DNS zone file, using the default // resolver for the current platform eg: // > dig _dnslink.ipfs.tech TXT // ;; ANSWER SECTION: // _dnslink.ipfs.tech. 60 IN CNAME _dnslink.ipfs-tech.on.fleek.co. // _dnslink.ipfs-tech.on.fleek.co. 120 IN TXT "dnslink=/ipfs/bafybe..."
This example uses the Mozilla provided RFC 1035 DNS over HTTPS service. This
uses binary DNS records so requires extra dependencies to process the
response which can increase browser bundle sizes.
If this is a concern, use the DNS-JSON-Over-HTTPS resolver instead.
DNSLink operations using a Helia node.
Example: Using custom DNS over HTTPS resolvers
To use custom resolvers, configure Helia's
dnsoption:Example: Resolving a domain with a dnslink entry
Calling
resolvewith the@helia/dnslinkinstance:Example: Using DNS-Over-HTTPS
This example uses the Mozilla provided RFC 1035 DNS over HTTPS service. This uses binary DNS records so requires extra dependencies to process the response which can increase browser bundle sizes.
If this is a concern, use the DNS-JSON-Over-HTTPS resolver instead.
Example: Using DNS-JSON-Over-HTTPS
DNS-JSON-Over-HTTPS resolvers use the RFC 8427
application/dns-jsonand can result in a smaller browser bundle due to the response being plain JSON.