To access your IPNS name, just use URL https://your-ipns-hash.ipns.surf
# ipfs daemon
# ipfs add --cid-version 1 example.html
It will return a CID (hash) for this version of the file. You can access your file through the following URL: https://ipfs.io/ipfs/your-cid
Example output:
added bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm example.html
Where "bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm" is the CID of your file. You can use the following URLs to access your file:
https://ipfs.io/ipfs/bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm or https://bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm.ipfs.dweb.link
# ipfs name publish /ipfs/cid-of-your-file
It will return the hash of the IPNS record for your file. You can use this hash as a subdomain of ipns.surf
Example output:
Published to k51qzi5uqu5dipo4719isofxynwutbh3zdhhtqbfgqcp3sr4gxarf2vsniqtnq: /ipfs/bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm
Where "k51qzi5uqu5dipo4719isofxynwutbh3zdhhtqbfgqcp3sr4gxarf2vsniqtnq" is the hash of your IPNS record for this file.
Afterwards, you can use this URL permanently on any web pages, messengers, or wherever you need this file.
# ipfs add example.html
# ipfs name publish /ipfs/new-cid-of-your-file