# Ipns publish issue

**URL:** <https://discuss.ipfs.tech/t/ipns-publish-issue/1608>\
**Category:** Help\
**Created:** [December 11, 2017, 7:37am UTC](https://discuss.ipfs.tech/t/ipns-publish-issue/1608 "2017-12-11T07:37:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [December 11, 2017, 7:37am UTC](https://discuss.ipfs.tech/t/ipns-publish-issue/1608/1 "2017-12-11T07:37:25Z")

</div>

hi，all  
I follow the tutorial “[https://ipfs.io/docs/examples/example-viewer/example#../websites/README.md](https://ipfs.io/docs/examples/example-viewer/example#../websites/README.md)”  
Q1:I “ipfs add -r” a website, but it can’t open in [http://gateway.ipfs.io/ipfs/$SITE\_HASH](http://gateway.ipfs.io/ipfs/%24SITE_HASH)

Q2: I “ipfs publish name” it,and it seems unsuccessful?

 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/a4022eed6526b310a47684ff406d51940a9b3173.png)

---

<div class="post-metadata">

**Author:** ![VictorBjelkholm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/victorbjelkholm/32/10_2.png) [@VictorBjelkholm](https://discuss.ipfs.tech/u/VictorBjelkholm)\
**Post date:** [December 11, 2017, 1:59pm UTC](https://discuss.ipfs.tech/t/ipns-publish-issue/1608/2 "2017-12-11T13:59:47Z")

</div>

Let’s first solve Q1. So let’s say you have the following directory:

```auto
my-directory/
   index.html
   another-file.txt

```

If you do `ipfs add -r my-directory` from outside the directory, you should see output that looks like this:

```auto
added QmU2viJUREiEcFPgx5rzEVtB8psw1F49hYc5C7pS6pffpt my-directory/another-file.txt
added QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o my-directory/index.html
added Qma2taWsdSfFHEWGZtN6XPdfNXCGdcGDoBgXERz4v1n9C9 my-directory

```

If you take the last hash, `Qma2taWsdSfFHEWGZtN6XPdfNXCGdcGDoBgXERz4v1n9C9` and load from your local node (by going to [http://localhost:8080/ipfs/Qma2taWsdSfFHEWGZtN6XPdfNXCGdcGDoBgXERz4v1n9C9](http://localhost:8080/ipfs/Qma2taWsdSfFHEWGZtN6XPdfNXCGdcGDoBgXERz4v1n9C9)), you should see the contents of the `index.html` file.

If that is working, but replacing `localhost:8080` with `ipfs.io` doesn’t load the `index.html` file, you’re having some troubles with getting the public gateways to reach you. Make sure no firewalls are blocking port `4001` and it should be working.

If you can’t load locally added files from the gateway, something with your connection is not allowing IPFS to work properly and IPNS is probably not gonna work very well then either.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [December 14, 2017, 8:49am UTC](https://discuss.ipfs.tech/t/ipns-publish-issue/1608/3 "2017-12-14T08:49:37Z")

</div>

thanks for ur detailed reply, and now I made it

As for DNS TXT record and A record I think it is none of ipfs’s business and it is only regarded for network layer
