IPFS Dedicated Gateways: Hosting a Static Website
Learn how to use an IPFS dedicated gateway to host a static website.
Filebase IPFS dedicated gateways can be configured to serve a single IPFS CID at the root of the gateway. This means that instead of needing to specify the IPFS CID in the gateway URL, by default the URL will host the configured CID.
For example, when using an IPFS gateway, the format typically follows:
When using a dedicated gateway with a root CID, the path and CID fields are not required to return the root CID. A dedicated gateway through Filebase will use the following domain structure:
If a root CID is set, this single URL can be shared to distribute the stored CID’s content.
This file is a basic HTML file to serve as the homepage of your website. Change and edit this file to reflect your website’s content, and style it accordingly. To learn more about HTML and CSS styling, see here.
<title>A Static Site Hosted on the Decentralized Web</title>
<h1 align="center" style="color:white;"> A Static Site Hosted on the Decentralized Web</h1>
<p style="color:orange;" align="center">
A website hosted on IPFS through Filebase, using a Filebase dedicated IPFS gateway.
<a href = "https://filebase.com">
<img src="./image1.png" width="300px" >
<table border align="center">
<tr> <th style="color:teal;">IPFS</th> <th style="color:green;">Sia</th>
<tr><td> <img src="./image2.png" width="400px" > </td> <td> <img src="./image3.png" width="400px"></td></tr>
Any files you want to be used with your website, such as image files or script files, save in this folder.
Currently, the directory should look like this:
- My Website
Filebase IPFS Dedicated Gateways are a feature only available to paid users. They are not available for users on the free tier.
Gateway names are subject to the same naming restrictions as bucket names. All gateway names must be lowercase, between 3-63 characters, and must be unique.