Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #21 from kalmi/patch-1
Browse files Browse the repository at this point in the history
Add information to "website" example about exposing an ipfs website to today's Internet
  • Loading branch information
RichardLitt committed Dec 24, 2015
2 parents a5f7af7 + fd17795 commit 6c93f85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/websites/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ And also try the same link on the public gateway. Once you're convinced that wor
lets again hide the hash. Change your DNS TXT record to `dnslink=/ipns/<your peer id>`,
wait for that record to propogate, and then try accessing `http://localhost:8080/ipns/your.domain`.

At this point, you have a website on ipfs/ipns, and you may be wondering how you could expose it at `http://your.domain`, so that the Internet users of today may access it too without them having to know about any of this. It's actually surpisingly simple to do, all you need for this is your previously created TXT record and to point the A record of `your.domain` to the ip address of an ipfs daemon that listens on port 80 for HTTP requests (such as `gateway.ipfs.io`). The users' browsers will send `your.domain` in the Host header of the requests, and you have your dnslink TXT records, so the ipfs gateway will recognize `your.domain` as an IPNS name, and so it will serve from under `/ipns/your.domain/` instead of `/`.

So, if you point `your.domain`'s A record to the IP of `gateway.ipfs.io`, and then wait for the DNS to propogate, then anyone should be able to access your ipfs-hosted site without any extra configuration simply at `http://your.domain`.

Happy Hacking!

By
Expand Down

0 comments on commit 6c93f85

Please sign in to comment.