# How are links created in IPFS? What happens to the link when the content is changed?

**URL:** <https://discuss.ipfs.tech/t/how-are-links-created-in-ipfs-what-happens-to-the-link-when-the-content-is-changed/5138>\
**Category:** Ecosystem and Usage\
**Created:** [April 1, 2019, 11:31am UTC](https://discuss.ipfs.tech/t/how-are-links-created-in-ipfs-what-happens-to-the-link-when-the-content-is-changed/5138 "2019-04-01T11:31:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![om202](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/om202/32/2744_2.png) [@om202](https://discuss.ipfs.tech/u/om202)\
**Post date:** [April 1, 2019, 11:31am UTC](https://discuss.ipfs.tech/t/how-are-links-created-in-ipfs-what-happens-to-the-link-when-the-content-is-changed/5138/1 "2019-04-01T11:31:41Z")

</div>

I wanted to learn about link creation in IPFS.  
Suppose, I have a file. Corresponding to the file, a hash is generated which shall form a link.  
But later I edited the file. Then a new hash shall be generated for the file. This means a new link shall be generated.  
This means every time the file is edited a new link shall result.

But this process shall result in inconsistency. If i had a link to refer to a particular file then due to the change in link, I may not be able to refer to the same file again.

Please correct me if I am wrong.

---

<div class="post-metadata">

**Author:** ![Akita](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/akita/32/2650_2.png) [@Akita](https://discuss.ipfs.tech/u/Akita)\
**Post date:** [April 1, 2019, 2:14pm UTC](https://discuss.ipfs.tech/t/how-are-links-created-in-ipfs-what-happens-to-the-link-when-the-content-is-changed/5138/2 "2019-04-01T14:14:08Z")

</div>

Correct. IPFS hashes are immutable by definition.

But lookup [IPNS](https://docs.ipfs.io/guides/concepts/ipns/) (IP name system). You can link every version of your file with the private key of your file, and the IPNS link always point to the last version.

---

<div class="post-metadata">

**Author:** ![om202](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/om202/32/2744_2.png) [@om202](https://discuss.ipfs.tech/u/om202)\
**Post date:** [April 2, 2019, 7:05am UTC](https://discuss.ipfs.tech/t/how-are-links-created-in-ipfs-what-happens-to-the-link-when-the-content-is-changed/5138/3 "2019-04-02T07:05:57Z")

</div>

Thank you @Akita for answering.
