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
Replace gateway.ipfs.io with gateway.example.net placeholder and add
explanatory callout boxes. The gateway.ipfs.io domain is a legacy domain
that caused unnecessary request duplication and should no longer be used
in documentation.
Users are now directed to use either:
- Self-hosted Kubo gateways
- Public good ipfs.io for testing
- Other public gateways with subdomain isolation support
Copy file name to clipboardExpand all lines: docs/how-to/host-git-repo.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@ Have you ever said to yourself: "Man, my Git server isn't distributed enough" or
10
10
11
11
In this guide, we discuss how to serve a Git repository through the IPFS network. The end result will be a `git clone`able URL served through IPFS!
12
12
13
+
:::callout
14
+
This guide uses `gateway.example.net` as a placeholder for an IPFS gateway. You can replace it with:
15
+
- A self-hosted [Kubo](../install/command-line.md) gateway
16
+
- For best-effort hosting and testing try [public good `ipfs.io` (`dweb.link` variant)](../concepts/public-utilities.md#public-ipfs-gateways), or any of the [public gateways](https://ipfs.github.io/public-gateway-checker/) that support "Origin" isolation ([subdomain mode](./address-ipfs-on-web.md#subdomain-gateway))
17
+
:::
18
+
13
19
To start, select a Git repository you want to host, and do a bare clone of it:
14
20
15
21
```bash
@@ -71,7 +77,7 @@ paths will now look something like:
Copy file name to clipboardExpand all lines: docs/how-to/host-single-page-site.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,12 @@ A great way to get to know IPFS is to use it to host a simple, single-page websi
11
11
We've put together a series of tutorials to walk you through hosting a full website on IPFS. [Take a look!](websites-on-ipfs/single-page-website.md)
12
12
:::
13
13
14
+
:::callout
15
+
This guide uses `gateway.example.net` as a placeholder for an IPFS gateway. You can replace it with:
16
+
- A self-hosted [Kubo](../install/command-line.md) gateway
17
+
- For best-effort hosting and testing try [public good `ipfs.io` (`dweb.link` variant)](../concepts/public-utilities.md#public-ipfs-gateways), or any of the [public gateways](https://ipfs.github.io/public-gateway-checker/) that support "Origin" isolation ([subdomain mode](./address-ipfs-on-web.md#subdomain-gateway))
18
+
:::
19
+
14
20
## Create your site
15
21
16
22
Assume you have a static website in a directory `mysite`.
@@ -37,7 +43,7 @@ The last hash, next to the folder name, `mysite/` is the one to remember, call i
37
43
38
44
You can test it out locally by opening `http://localhost:8080/ipfs/$SITE_CID` in a browser or with `wget` or `curl` from the command line.
39
45
40
-
To view it from another ipfs node, you can try `http://gateway.ipfs.io/ipfs/$SITE_CID` in a browser. This will work from a browser on another device, inside or outside the network where you added the site's file.
46
+
To view it from another ipfs node, you can try `http://gateway.example.net/ipfs/$SITE_CID` in a browser. This will work from a browser on another device, inside or outside the network where you added the site's file.
41
47
42
48
Those hashes are difficult to remember. Let's look at some ways to get rid of them.
43
49
@@ -56,7 +62,7 @@ your.domain. 60 IN TXT "dnslink=/ipfs/$SITE_CID"
56
62
57
63
Now you can view your site at `http://localhost:8080/ipns/your.domain`.
58
64
59
-
You can also try this on the gateway at `http://gateway.ipfs.io/ipns/your.domain`.
65
+
You can also try this on the gateway at `http://gateway.example.net/ipns/your.domain`.
60
66
61
67
More questions about DNSLink? Check out the [DNSLink website](http://dnslink.io/) for tutorials, examples, and FAQs.
62
68
@@ -79,9 +85,9 @@ Published to $PEER_ID: /ipfs/$SITE_CID
79
85
80
86
You will need to note and save that value of `$PEER_ID` for the next steps.
81
87
82
-
Load the URLs `http://localhost:8080/ipns/$PEER_ID` and `http://gateway.ipfs.io/ipns/$PEER_ID` to confirm this step.
88
+
Load the URLs `http://localhost:8080/ipns/$PEER_ID` and `http://gateway.example.net/ipns/$PEER_ID` to confirm this step.
83
89
84
-
Return to your registrar's control panel, change the DNS TXT record with the key of `your.domain` to `dnslink=/ipns/$PEER_ID`, wait for that record to propagate, and then try the URLs `http://localhost:8080/ipns/your.domain` and `http://gateway.ipfs.io/ipns/your.domain`.
90
+
Return to your registrar's control panel, change the DNS TXT record with the key of `your.domain` to `dnslink=/ipns/$PEER_ID`, wait for that record to propagate, and then try the URLs `http://localhost:8080/ipns/your.domain` and `http://gateway.example.net/ipns/your.domain`.
85
91
86
92
**Note:** When using IPNS to update websites, assets may be loaded from two different resolved hashes while the update propagates. This may result in outdated URLs or missing assets until the update has completely propagated.
87
93
@@ -91,10 +97,10 @@ You now have a website on ipfs/ipns, but your visitors can't access it at `http:
91
97
92
98
What we can do is have requests for `http://your.domain` resolved by an IPFS gateway daemon.
93
99
94
-
Return to your registrar's control panel and add an A record with key of `your.domain` and value of the IP address of an ipfs daemon that listens on port 80 for HTTP requests (such as `gateway.ipfs.io`). If you don't know the IP address of the daemon you plan to use, you can find it using the command like:
100
+
Return to your registrar's control panel and add an A record with key of `your.domain` and value of the IP address of an ipfs daemon that listens on port 80 for HTTP requests (such as `gateway.example.net`). If you don't know the IP address of the daemon you plan to use, you can find it using the command like:
95
101
96
102
```bash
97
-
$ nslookup gateway.ipfs.io
103
+
$ nslookup gateway.example.net
98
104
```
99
105
100
106
1. Note the IP addresses returned.
@@ -105,12 +111,12 @@ Note: The ipfs.io gateway IP addresses won't change, so you can set them and for
105
111
106
112
Visitors' browsers will send `your.domain` in the Host header of their requests. The ipfs gateway will recognize `your.domain`, look up the value of the DNS TXT for your domain, then serve the files in `/ipns/your.domain/` instead of `/`.
107
113
108
-
If you point `your.domain`'s A and AAAA record to the IP addresses of `gateway.ipfs.io`, and then wait for the DNS to propagate, then anyone should be able to access your ipfs-hosted site without any extra configuration at `http://your.domain`.
114
+
If you point `your.domain`'s A and AAAA record to the IP addresses of `gateway.example.net`, and then wait for the DNS to propagate, then anyone should be able to access your ipfs-hosted site without any extra configuration at `http://your.domain`.
109
115
110
116
## Use CNAMEs
111
117
112
118
Alternatively, it is possible to use CNAME records to point at the DNS records of the gateway. This way, IP addresses of the gateway are automatically updated.
113
119
114
120
However you will need to change the key for the TXT record from `your.domain` to `_dnslink.your.domain`.
115
121
116
-
So by creating a CNAME for `your.domain` to `gateway.ipfs.io` and adding a `_dnslink.your.domain` record with `dnslink=/ipns/<your peer id>` you can host your website without explicitly referring to IP addresses of the ipfs gateway.
122
+
So by creating a CNAME for `your.domain` to `gateway.example.net` and adding a `_dnslink.your.domain` record with `dnslink=/ipns/<your peer id>` you can host your website without explicitly referring to IP addresses of the ipfs gateway.
Copy file name to clipboardExpand all lines: docs/how-to/websites-on-ipfs/multipage-website.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,12 @@ description: Learn how to host a website with multiple pages and external assets
7
7
8
8
In this guide, you will learn how to host a website with multiple pages and external assets on IPFS. This tutorial is the second in a series of tutorials aimed at teaching web developers how to build websites and applications using IPFS. You don't need to have completed the previous tutorial to understand what's going on here, but if you're new to the IPFS ecosystem, it's a good idea to follow through the [single page website guide](../../how-to/websites-on-ipfs/single-page-website.md) before you start this one. It will give you a solid foundation to work off.
9
9
10
+
:::callout
11
+
This guide uses `gateway.example.net` as a placeholder for an IPFS gateway. You can replace it with:
12
+
- A self-hosted [Kubo](../../install/command-line.md) gateway
13
+
- For best-effort hosting and testing try [public good `ipfs.io` (`dweb.link` variant)](../../concepts/public-utilities.md#public-ipfs-gateways), or any of the [public gateways](https://ipfs.github.io/public-gateway-checker/) that support "Origin" isolation ([subdomain mode](../address-ipfs-on-web.md#subdomain-gateway))
14
+
:::
15
+
10
16
## Prerequisites
11
17
12
18
If you followed the previous tutorial, you would already have the IPFS Desktop application installed. If not, you can grab it from the [IPFS Shipyard](https://github.com/ipfs-shipyard/ipfs-desktop).
@@ -217,7 +223,7 @@ Instead of sharing the CID of your website, you publish the root CID of your web
217
223
218
224
The `k51qzi...` is your IPFS installation's key! This is what you can use to point people to your content.
219
225
220
-
1. You should now be able to view your project by going to `https://gateway.ipfs.io/ipns/k51qzi...`. Replace `k51qzi...` with the output from the previous step.
226
+
1. You should now be able to view your project by going to `https://gateway.example.net/ipns/k51qzi...`. Replace `k51qzi...` with the output from the previous step.
221
227
1. Whenever you make any changes to your project, simply re-add your content to IPFS and publish it to IPNS:
222
228
223
229
```shell
@@ -232,7 +238,7 @@ Instead of sharing the CID of your website, you publish the root CID of your web
232
238
> Published to k51qzi5uqu5dh9gnl66grpnpuhj245ha1xq9ajtmuf7swe847zovdg1t9a0xiz: /ipfs/QmchJPQNLE5EUSYTzfzUsNFyPozXyANiZHFDSFKWdLNdRR
233
239
```
234
240
235
-
Now, just head back to the `https://gateway.ipfs.io/ipns/k51qzi...` link to view your updates!
241
+
Now, just head back to the `https://gateway.example.net/ipns/k51qzi...` link to view your updates!
236
242
237
243
This is just the tip of the iceberg when it comes to IPNS. [Check out the IPNS page to learn more →](../../concepts/ipns.md)
0 commit comments