Imagine a website today is like a house on a specific piece of land (a central server). If that land is sold or the house burns down, your website is gone.
IPFS and Blockchain are technologies to change that:
- IPFS (The Distributed File System): Instead of one house on one piece of land, your website is broken into pieces, and thousands of copies of those pieces are stored on computers all around the world. To find it, you don’t ask for an address; you ask for a unique fingerprint (a hash). This makes it permanent, resilient, and fast.
- Blockchain (The Notary): The blockchain is used to record that unique fingerprint of your website on a permanent, tamper-proof ledger. It’s the ultimate proof of “this is what my website looked like at this exact moment,” and no one can change that record.
Together, they can create websites that are uncensorable, permanent, and don’t rely on any single company or server.
Breaking Down the Concepts
Let’s look at each part in more detail.
1. What is a “Normal” Website? (The Client-Server Model)
To understand the new, you must understand the old.
- Centralized Servers: Your website’s files (HTML, CSS, images) live on a single server, owned by a company like Amazon AWS, GoDaddy, or Bluehost.
- Location-Based Addressing: You find the website using an address (URL) like
https://www.mywebsite.com. This points to the location of the server. - The Problems:
- Single Point of Failure: If that server goes down, your website is gone for everyone.
- Censorship: A government or company can force the hosting provider to take the site down.
- Slow for Distant Users: If the server is in the US and a user is in Australia, the data has to travel a long way, making it slower.
- Link Rot: If a page is moved or deleted, the link breaks forever (Error 404).
2. What is IPFS? (The Distributed Web)
IPFS stands for InterPlanetary File System. It’s a peer-to-peer (P2P) protocol for storing and sharing data in a distributed file system.
- Content-Based Addressing: This is the core idea. Instead of asking “Where is the file?”, you ask “What is the file’s unique fingerprint (cryptographic hash)?”
- On the normal web:
https://mywebsite.com/image.jpg - On IPFS:
/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Cat.jpg - That long string
QmXoy...is the hash. It is generated from the file’s content. If the file changes, the hash changes completely.
- On the normal web:
- How it Works:
- You add a file (or your entire website) to IPFS. It gets split into smaller chunks, and each chunk gets a unique hash.
- Your computer becomes a “node” and starts hosting (serving) those chunks.
- Other IPFS nodes around the world can find and cache these chunks based on their hash.
- When someone wants to view your website, their IPFS node finds and retrieves the chunks from the closest available nodes, not just from one central server.
- Benefits of IPFS for Websites:
- Permanence: As long as at least one computer on the IPFS network is hosting your content, it remains accessible. It can’t be taken down by attacking one server.
- Efficiency & Speed: Content is fetched from multiple nearby sources, which can be faster.
- Offline & Local Network Access: Great for areas with poor internet connectivity; nodes on a local network can share content directly.
- Immutable: The content with a specific hash can never be changed. If you update your website, it creates a new hash.
3. What is the Blockchain’s Role?
The blockchain (like Ethereum) is a separate but complementary technology.
- The Problem with IPFS Alone: If you update your website, you get a new IPFS hash. How do people find the latest version? You need a trusted, immutable way to point to the current hash.
- The Solution:
You can store the latest IPFS hash of your website on a blockchain. Think of the blockchain as a permanent, unchangeable phone book.- You deploy a smart contract (a tiny program on the blockchain).
- That smart contract has a variable, like
currentWebsiteHash. - Whenever you update your site and get a new IPFS hash, you call a function on the smart contract to update
currentWebsiteHash.
This creates a tamper-proof link between your website’s name (managed by a system like ENS – Ethereum Name Service) and its current content.
Putting It All Together: A “Blockchain Website”
A fully decentralized website, often called a dApp (Decentralized Application), uses both:
- Frontend (The Website UI): Your HTML, CSS, and JavaScript files are hosted on IPFS.
- Backend & Logic: The business logic, user accounts, and transactions are handled by Smart Contracts on the blockchain.
- The Link: A human-readable name (e.g.,
mywebsite.eth) is registered via ENS, which points to the smart contract address, which in turn contains the latest IPFS hash for the frontend.
A user’s experience:
A user types mywebsite.eth into a compatible browser (like Brave) or a gateway. The browser looks up the name on the blockchain, finds the latest IPFS hash, and then loads the website content from the IPFS network.
Summary Table: Traditional vs. IPFS/Blockchain Website
| Feature | Traditional Website | IPFS/Blockchain Website |
|---|---|---|
| Hosting | Centralized Server | Distributed Network (P2P) |
| Addressing | Location (https://...) | Content (Hash /ipfs/...) |
| Permanence | Fragile (Server can fail) | Robust (Lives on many nodes) |
| Censorship | Easy to censor | Very difficult to censor |
| Content | Can be changed silently | Immutable (changing creates new hash) |
| Ownership | Controlled by a company | Controlled by private keys |
| Cost | Monthly hosting fees | One-time gas fees to deploy + pinning services |
In conclusion, IPFS provides the resilient, distributed storage for the website’s files, while the blockchain provides the trustless, permanent record-keeping and pointer to the latest version. Together, they form the backbone of Web3, a user-owned and controlled internet.
Get sample project here
