You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: content/guides/concepts/dnslink.md
+31-4
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,15 @@ menu:
5
5
parent: concepts
6
6
---
7
7
8
-
DNSLink uses DNS records to map a domain name (like `ipfs.io`) to an IPFS address. Because you can edit your DNS records, you can use them to always point to the latest version of an object in IPFS (remember that an IPFS object’s address changes if you modify the object). Because DNSLink uses DNS records, the names it produces are also usually easy to type and read.
8
+
DNSLink uses [DNS TXT](https://en.wikipedia.org/wiki/TXT_record) records to map
9
+
a domain name (like `ipfs.io`) to an IPFS address. Because you can edit your
10
+
DNS records, you can use them to always point to the latest version of an
11
+
object in IPFS (remember that an IPFS object’s address changes if you modify
12
+
the object). Because DNSLink uses DNS records, the names it produces are also
13
+
usually easy to type and read.
9
14
10
-
A DNSLink address looks like an [IPNS](/concepts/ipns) address, but it uses a domain name in place of a hashed public key:
15
+
A DNSLink address looks like an [IPNS](/guides/concepts/ipns) address, but it
16
+
uses a domain name in place of a hashed public key:
11
17
12
18
```
13
19
/ipns/ipfs.io
@@ -25,9 +31,9 @@ When an IPFS client or node attempts to resolve that address, it looks for a `TX
25
31
dnslink=/ipfs/<CID for your content here>
26
32
```
27
33
28
-
For example, if you look up ipfs.io’s DNS records, you’ll see its DNSLink entry (see “answer section” at the bottom):
34
+
For example, if you look up `ipfs.io`’s DNS records, you’ll see its DNSLink entry:
29
35
30
-
```
36
+
```sh
31
37
$ dig +noall +answer TXT ipfs.io
32
38
ipfs.io. 59 IN TXT "dnslink=/ipfs/QmYNQJoKGNHTpPxCBPh9KkDpaExgd2duMa3aF6ytMpHdao"
You can also publish DNSLink records using a special subdomain named `_dnslink`. This is useful when you want to improve the security of an automated setup or delegate control over your DNSLink records to a third-party without giving away full control over the original DNS zone.
57
+
58
+
For example, [`docs.ipfs.io`](https://docs.ipfs.io) does not have a TXT record, but the page still loads
59
+
because a TXT record exists for `_dnslink.docs.ipfs.io`:
60
+
61
+
```sh
62
+
$ dig +noall +answer TXT _dnslink.docs.ipfs.io
63
+
_dnslink.docs.ipfs.io. 34 IN TXT "dnslink=/ipfs/QmeveuwF5wWBSgUXLG6p1oxF3GKkgjEnhA6AAwHUoVsx6E"
64
+
```
65
+
66
+
<!-- TODO: Once IPNS is more reliable, describe combining it with DNSLink.
67
+
### Linking to IPNS
68
+
69
+
DNSLink can point at [IPNS](/guides/concepts/ipns) paths as well. IPNS path is
70
+
a mutable pointer which enables you to update your website by publishing
71
+
to a PeerID without the need for updating TXT record every time hash changes.
0 commit comments