IPFS Website tutorial

IPFS website

Generate keys for your site (/ipns/this_hash)

ipfs key gen --type=rsa --size=2048 my_site

Add your site folder to IPFS

ipfs add -r my-site/

Publish your CID to your peerID

ipfs name publish --key=my_site <hash my_site>

Test that your peerID properly resolves to you CID

ipfs name resolve <peerID>

Add txt record for _dnslink.foo.bar.tld TXT record contents

dnslink=/ipns/<peerID>
OR 
dnslink=/ipfs/<CID>

To create multiple sites on your IPFS node — you can generate several named peerId. For example to add my2ndsite:

Note: If you use an IPNS hash in your DNSlink TXT it will resolve but it will not be delivered via users local gateways. If you use an IPFS hash users will have it delivered via their local gateway.