Skip to content

Commit f5bc4af

Browse files
committed
chore: remove mentions of gateway.ipfs.io
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
1 parent 6cc0ad8 commit f5bc4af

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

docs/how-to/host-git-repo.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ description: Learn how to serve a static Git repository worldwide using IPFS.
66

77
# Host a Git repo
88

9+
:::callout
10+
This guide uses `gateway.example.net` as a placeholder for an IPFS gateway. You can replace it with:
11+
- A self-hosted [Kubo](../install/command-line.md) gateway
12+
- 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))
13+
:::
14+
915
Have you ever said to yourself: "Man, my Git server isn't distributed enough" or "I wish I had an easy way to serve a static Git repository worldwide"? Well, wish no more.
1016

1117
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!
@@ -71,7 +77,7 @@ paths will now look something like:
7177

7278
```go
7379
import (
74-
mylib "gateway.ipfs.io/ipfs/QmX679gmfyaRkKMvPA4WGNWXj9PtpvKWGPgtXaF18etC95"
80+
mylib "gateway.example.net/ipfs/QmX679gmfyaRkKMvPA4WGNWXj9PtpvKWGPgtXaF18etC95"
7581
)
7682
```
7783

docs/how-to/host-single-page-site.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: Learn how to host a simple single-page website on the decentralized
55

66
# Host a single-page website
77

8+
:::callout
9+
This guide uses `gateway.example.net` as a placeholder for an IPFS gateway. You can replace it with:
10+
- A self-hosted [Kubo](../install/command-line.md) gateway
11+
- 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))
12+
:::
13+
814
A great way to get to know IPFS is to use it to host a simple, single-page website. Here's a step-by-step guide to doing just that.
915

1016
::: tip
@@ -37,7 +43,7 @@ The last hash, next to the folder name, `mysite/` is the one to remember, call i
3743

3844
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.
3945

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.
4147

4248
Those hashes are difficult to remember. Let's look at some ways to get rid of them.
4349

@@ -56,7 +62,7 @@ your.domain. 60 IN TXT "dnslink=/ipfs/$SITE_CID"
5662

5763
Now you can view your site at `http://localhost:8080/ipns/your.domain`.
5864

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`.
6066

6167
More questions about DNSLink? Check out the [DNSLink website](http://dnslink.io/) for tutorials, examples, and FAQs.
6268

@@ -79,9 +85,9 @@ Published to $PEER_ID: /ipfs/$SITE_CID
7985

8086
You will need to note and save that value of `$PEER_ID` for the next steps.
8187

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.
8389

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`.
8591

8692
**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.
8793

@@ -91,10 +97,10 @@ You now have a website on ipfs/ipns, but your visitors can't access it at `http:
9197

9298
What we can do is have requests for `http://your.domain` resolved by an IPFS gateway daemon.
9399

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:
95101

96102
```bash
97-
$ nslookup gateway.ipfs.io
103+
$ nslookup gateway.example.net
98104
```
99105

100106
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
105111

106112
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 `/`.
107113

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`.
109115

110116
## Use CNAMEs
111117

112118
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.
113119

114120
However you will need to change the key for the TXT record from `your.domain` to `_dnslink.your.domain`.
115121

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.

docs/how-to/websites-on-ipfs/multipage-website.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: Learn how to host a website with multiple pages and external assets
55

66
# Multi-page website
77

8+
:::callout
9+
This guide uses `gateway.example.net` as a placeholder for an IPFS gateway. You can replace it with:
10+
- A self-hosted [Kubo](../../install/command-line.md) gateway
11+
- 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](../../how-to/address-ipfs-on-web.md#subdomain-gateway))
12+
:::
13+
814
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.
915

1016
## Prerequisites
@@ -217,7 +223,7 @@ Instead of sharing the CID of your website, you publish the root CID of your web
217223

218224
The `k51qzi...` is your IPFS installation's key! This is what you can use to point people to your content.
219225
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.
221227
1. Whenever you make any changes to your project, simply re-add your content to IPFS and publish it to IPNS:
222228
223229
```shell
@@ -232,7 +238,7 @@ Instead of sharing the CID of your website, you publish the root CID of your web
232238
> Published to k51qzi5uqu5dh9gnl66grpnpuhj245ha1xq9ajtmuf7swe847zovdg1t9a0xiz: /ipfs/QmchJPQNLE5EUSYTzfzUsNFyPozXyANiZHFDSFKWdLNdRR
233239
```
234240
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!
236242
237243
This is just the tip of the iceberg when it comes to IPNS. [Check out the IPNS page to learn more →](../../concepts/ipns.md)
238244

0 commit comments

Comments
 (0)