How to Host a website for free on google drive

Tuyen How To DIY
4 followers
83 Video Views·Nov 6, 2023
How to host a website on Google Drive for free
Google Drive was designed to store files.
However, it is also possible to use it as a web hosting.
We have already made a video on this subject,
but this time I'm going to show you a better way.
Before we begin, let's see what are the benefits.
Google Drive has a familiar interface that you already understand.
You won't need any FTP software.
You can manage your website files from within the Google Drive.
You'll get 15 gigabytes of storage.
You can use your own custom domain name.
And the best part, it's free.
On the negative side, it may be slower than other options,
but we will fix this by using a free CDN.
Also, it doesn't support databases.
You can only host static websites.
If you want to host dynamic websites for free, check the video above.
So, should you use Google Drive to host websites?
In some cases where high performance is not required,
Google Drive can be a handy solution.
For example, if you want to showcase your designs to a client,
if you want to test a website, practice coding,
or host a small project for fun.
If you want to host a website on Google Drive,
here is how to do it properly.
This is the folder containing the website files.
The name of this folder should be the same as your domain name.
Open it and make sure you have a file named index.html.
Now, go to Google Drive and create a new account.
Use this new account to host your website and don't use it for anything else.
Drop your website folder in your drive.
Right-click and rename it.
Type www before the domain name, like this.
Right-click again and select Get Link.
Here, change it to Anyone with the Link.
Click here and type in your primary email address,
so later you can conveniently access the files from your primary Drive account.
Open a new tab and go to drv.tw.
Sign in with the new Google account you just created.
By clicking Allow, you let the service access your new Google Drive.
This is the reason we created a fresh new account.
This is your website's URL.
Copy it and open it in your browser.
Your website should be online.
Now, let's add your own domain name.
Go to the registrar where you bought your domain.
In my case, mine is namecheap.com.
On the DNS settings, remove the current name servers.
Add a new CNAME record.
On the Host field, type www.
And on the Value field, paste the website URL you copied previously.
Remove the HTTPS prefix.
And remove everything after drv.tw.
Set the TTL to 30 minutes and save changes.
Now, add another record.
Select URL Redirect.
On the Host field, type at.
And in the Value field, type http followed by your own domain name, just like this.
Now, save changes.
Open a new tab and type your domain name.
Your website should be online.
Congratulations.
You hosted your website on Google Drive for free.
If your website is not yet visible, don't worry.
Just wait an hour and check again.
Sometimes the DNS takes up to 48 hours to complete.
If you have any questions, leave a comment down below.
In the next video, I will show you how to improve your website speed and security for free.
If you enjoyed this video, subscribe for more tips.
And always remember to work smart, not hard.
