Back

Blog details

IPFS Immutability: Why You Can't Edit a File in Place

AIOZ Network
4 min readSeptember 23, 2026
aioz-pin

Try to "edit" a file on IPFS the way you'd edit a file on a normal server, overwrite it in place, keep the same address, and it doesn't work that way. IPFS's own documentation states it directly: "once a file is added to the IPFS network, the content of that file cannot be changed without altering the content identifier." That's not a limitation to work around, it's the entire mechanism content addressing runs on, and understanding what actually happens when content changes clears up a lot of confusion about versioning on IPFS.

TL;DR:

  • IPFS content is immutable by design: a file's CID is derived from its own contents, so changing the content produces a different CID, not an edited version of the same one
  • "Editing" a file on IPFS doesn't modify anything in place. It creates an entirely new Merkle DAG with new hashes; the original content and its original CID remain exactly as they were
  • This is a direct, deliberate consequence of content addressing, not a missing feature: it's what makes a CID a reliable, tamper-evident reference in the first place
  • IPNS exists specifically to solve the practical problem this creates: a mutable pointer that can be updated to point at a new CID, so there's a stable address even though the underlying content keeps changing identifiers
  • For AIOZ Pin users, this means re-pinning an edited file always produces a new pin, not an update to the old one, which is exactly why AIOZ Pin's pinned-file count reflects genuinely distinct versions, not edits in place

What "Immutable" Actually Means Here

A file's CID isn't an assigned label, it's derived cryptographically from the file's own contents. That single fact is what makes IPFS content immutable: there's no way to change what a specific CID points to, because the CID itself is mathematically tied to the exact bytes it was computed from. Change even one byte, and you get a different hash, which means a different CID, which means, functionally, a different piece of content as far as the network is concerned. The original CID keeps pointing at the original, unmodified content forever, or for as long as anyone keeps hosting it.

What Actually Happens When You "Edit" a File

Picture a file represented as a node in IPFS's Merkle DAG. Editing it doesn't touch that node. Per IPFS's own documentation, describing exactly this scenario: the original node "is not being edited, updated, or otherwise changed. Instead, we are creating a new DAG" with new hashes pointing to the modified content. The old version stays exactly where it was, fully intact, under its original CID. The "edited" version is a completely separate object with its own CID, that happens to share some content with the original, not a modification of it.

This has a practical consequence worth being explicit about: nothing about editing a file destroys or overwrites the original. Both versions can coexist indefinitely, addressable independently, as long as something keeps each one pinned.

Why This Is a Feature, Not a Limitation

Immutability isn't an accidental side effect of how CIDs happen to work, it's the entire reason content addressing is trustworthy. If a CID could be silently repointed at different content over time, it would stop being a reliable reference at all, the whole value of "this identifier verifiably corresponds to this exact content" would collapse. A URL can be repointed at different content anytime, with no way for a visitor to know it changed. A CID structurally cannot be, and that's precisely what makes it useful as a tamper-evident reference for things like NFT metadata, where the entire point is that the reference can't quietly change out from under the token pointing at it.

The Practical Problem This Creates, and How IPNS Solves It

Immutability is exactly right for content that shouldn't change. It's genuinely inconvenient for content that's supposed to update, a website, a document being actively worked on, anything where you want one stable address that always resolves to "the current version." IPFS's documentation is direct about the fix: "this process is essentially what the InterPlanetary Naming Service (IPNS) does." IPNS provides a mutable pointer, an address that can be updated to point at a new CID whenever the underlying content changes, so visitors always reach one stable name while the content it resolves to keeps getting new, immutable CIDs underneath. The historical versions don't disappear, IPNS just stops pointing at them once it's updated.

What This Means for AIOZ Pin Pinning

Since AIOZ Pin pins by CID, "updating" a pinned file through pinFilesToIPFS() doesn't modify the existing pin, it creates a new pin for the new CID. Both the original and the edited version remain separately pinned (and separately billed) unless the original is explicitly unpinned. This is worth knowing before assuming a re-upload replaces anything: it doesn't, it adds. For content that's genuinely meant to be a living, updatable reference rather than a fixed snapshot, layering IPNS (or a DNSLink) on top of AIOZ Pin's pinning is the right pattern, not repeatedly re-pinning and hoping something old gets cleaned up automatically.

Frequently Asked Questions

Can you edit a file on IPFS? Not in place. Modifying content produces a new CID pointing to a new object in the Merkle DAG. The original content and its original CID remain unchanged and independently addressable.

Does editing a file on IPFS delete the original version? No. The original stays exactly as it was, under its original CID, as long as something keeps it pinned. Editing creates an additional object, it doesn't overwrite anything.

Why is IPFS content immutable in the first place? Because a CID is derived directly from the content's own hash. That's what makes it a reliable, tamper-evident reference, if it could be silently repointed, it would stop being trustworthy as an identifier.

How do you get a stable, updatable address on IPFS then? IPNS. It provides a mutable pointer that can be updated to a new CID whenever content changes, giving you one stable name while the underlying content keeps getting new immutable CIDs.

What happens if I re-pin an edited file on AIOZ Pin? It creates a new, separate pin for the new CID. The original pin isn't replaced or updated, both exist independently unless you explicitly unpin the original.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

IPFS Is Rate-Limiting Public Gateways: What Changes for You

Free public IPFS gateways are being rate-limited on purpose, not as a bug. Here is exactly what IPFS's own blog says is changing, and what to actually do.

4 min readOctober 05, 2026
blog thumbnail

Real-World IPFS Case Studies: Audius and LikeCoin

Two real, documented IPFS deployments, a media platform and a blockchain publisher, and the specific architectural problem each one solved with it.

4 min readOctober 02, 2026
blog thumbnail

How to Host a Static Website on IPFS (and Why Pin It)

Uploading a site to IPFS is the easy part. Here is the full picture: CID, gateway access, a real domain, and the pinning step most tutorials skip.

5 min readSeptember 30, 2026
blog thumbnail

What Happens to Your Files If You Stop Using AIOZ Pin

Cancelling a pinning service is not documented the way it should be, anywhere in the industry. Here is exactly what you can control before you stop paying.

4 min readSeptember 28, 2026
blog thumbnail

Types of IPFS Nodes: The Different Roles, Explained

IPFS node types aren't a full-vs-light weight class the way some blockchains work. They are specific jobs a node opts into. Here is what each one does.

5 min readSeptember 25, 2026
blog thumbnail

IPFS Immutability: Why You Can't Edit a File in Place

IPFS content is immutable by design: change one byte and the CID changes with it. Here is exactly what happens when you edit a file, and why IPNS fixes it.

4 min readSeptember 23, 2026