This was originally posted on: https://herewecode.io/blog/how-to-deploy-a-static-website-for-free-in-only-3-minutes-with-google-drive/
Discover how to deploy a static website for free in only 3 minutes using Fast.io. A beginner's guide to doing it with a cloud storage such as Google Drive.
In this article, I'm going to share with you a new service called Fast.io.
I'm not sponsored by them to create this article. I'm just writing on it because I found the solution exciting and useful to host a static website for free.
Fast.io is a solution created by Mediafire to simplify how the web. In a few terms, their goal is to make your life easier by making the web more accessible and manageable.
If today I'm sharing this website with you, it's because they launched it at the end of 2019.
With this solution, you will be able in a few clicks to connect to your cloud (Google Drive, DropBox, etc.), choose a website name, and deploy your content.
If your content is ready, only 3 minutes are required to put your content online and accessible to everyone.
Once your website is online, you can configure it, add a custom domain name, and connect Google Analytics to know how many people you are reaching.
I didn't tell you, but the service automatically updates your website once you modify the source files. For example, if you are using Google Drive to share your content, once you change something in your HTML page, it will be updated.
Fast.io - How it works
I give you a list of available storage provider the day were I publish my article:
- Google Drive
We can imagine this list is going to grow up with new services. What I wanted to show you is that you have many possibilities to host your static website.
It exists different companies creating a solution to put online quickly a static website. The most famous solutions are GitHub Pages, Heroku, and Netlify.
I'm not telling you Fast.io is the best one, but what I like about it is the simplicity of deploying a simple website.
If you want to deploy something more complex like a Python Flask website, you can't do it with Fast.io.
In this case, I highly recommend using Heroku.
As I told you, I'm transparent with you. It's an excellent service to do some tasks.
Before showing you how to deploy your website, I think it's essential to define what is a static website and what is the difference with a dynamic one.
A static website contains web pages with fixed content. The content of your page is in HTML, and all users see the same thing.
For example, you can use this website type when you want to do a landing page for your website (a basic page with information about your product).
The main difference with a dynamic website is obviously… the dynamic part!
A dynamic website uses a server technology to build the page when a user requests the website.
For example, you can use this website type for your blog. Every time you're going to add a new article in your database, the website will display it.
Are you ready to share your page to everyone? Let’s do it!
In this part, I will show you how to put your website online in a few clicks. I’m going to use a basic HTML page, but once you understand how Fast.io works, you are free to modify everything.
Feel free to send me a message on Twitter if you have any questions or to get the last updates and follow my activities.
You need to create an index.html file with your HTML code inside. I recommend you to start with something simple because you can update it later.
Save the file on your computer.
<!DOCTYPE html> <html> <head> <title>My Static Website</title> </head> <body> <h1>My Static Website</h1> <p> Hello, I'm online, and everyone can see me! </p> </body> </html>
All you need to do to start with Fast.io is opening the website. Once you did it, click on "Sign up now - it's free!".
This page appears after step 2, and you can select a storage provider. Select "Google Drive".
When your account is ready, a "Welcome to Fast!" page will appear. Click on "Let's begin!".
Fast.io allows you to create three website types: File Sharing website, Web Pages, or Files Browser website.
In our case, we will select "Web Pages" because we want to host an HTML web page.
You did it! Your website is online and available at the URL you chose. In my case, you can find my site on mygoogledrivewebsite.imfast.io
If you open your website, you may notice an error because you didn't upload your index.html file on your Google Drive.
Two ways to do it:
- Open your Google Drive and search for Fast.io folder, then the folder of your website (in my case, "mygoogledrivewebsite.imfast.io").
- On the step 4 success page, click on "See your Google Drive".
Wait for a little before the change appears on your website.
Spread the word to all your friends! Your website is only, and everyone can see it!
If you are curious and want to configure everything, you can go back to your dashboard and click on your website.
You will be able to link your website to Google Analytics (visitors statistics), change domain name by yours (for example, mywebsite.com), and a lot more!
If you want to read more content like this, you can follow me on Twitter where I share content about programming, self-development and other advice to reach your goals as a developer!