Upload the Website
Make sure to name the main page of the website to index.html.
- Go to the Objects tab
- Click on Upload Files
- Select all your website files and upload them
At this point, your website should be accessible from https://storage.googleapis.com/<your bucket name>/index.html.
However, if you notice, the website won’t work if you try to remove the index.html from the address. But that is not the case in real life, right? You don’t go to w3wiki.org/index.html, you go to just w3wiki.org. So, let’s try and make our website even more professional. We will ask Google Cloud Storage to serve index.html by default when no path is specified in the URL.
- Click on Buckets from the sidebar
- Click on the three dots for your bucket
- Click on Edit Website Configuration
- Add index.html in both the input boxes
- Click on Save
Hosting a Static Website on Google Cloud Storage: Step-by-Step Tutorial
You have finally built the awesome portfolio website that all recruiters want. But now the question is, where to host it? Well, there are quite a few options for it, and object storage solutions like Google Cloud Storage and AWS S3 are some of the popular ones. You can host your static website in just a few steps using them.
Now what is object storage? It is simply one of the methods to store files which are called objects. It was created with cost-effectiveness in mind. Object Storage solutions are also generally called S3 compatible. So, Google Cloud Storage, AWS S3, Cloudflare R2, and Backblaze B2 are some of the S3-compatible storage solutions.
In this article, we will see how to deploy an awesome cat website on Google Cloud Storage. AsiaPlease note that you can only host static websites and not dynamic ones. But why? Simply because dynamic websites require a server.
Contact Us