How to host a website for free on google drive ?

Google Drive has always been a great place to store HTML, JavaScript and CSS files so they are secure and available from anywhere. Now you can host and share this content too! Watch this video to learn more.

We’re a big fan of cloud services on this blog,  If you’re wondering how to host a website on Google Drive for free, well, I just did (and it took me 2 minutes!) so I’ll tell you all about it.

Even though the new Google Drive has made it harder to host websites, there’s still a pretty easy workaround I came across.

How to Host

In a easier way

To host a web page on Google Drive:

Create a folder in Google Drive and set the sharing permission to “Public on the Web.”

Upload the HTML, JavaScript and CSS files for your web page to the new folder.

Select the HTML file, open it and click the “Preview” button in the toolbar.

Share the URL (it will look like…) and anyone can view your web page!

But this is not easy that much as expected. Few things keep in mind that google drive hosts only static pages. ( No dynamic websites like WordPress). If your website is of few pages and css files then the google drive is best option to host ( Free of cost )

In a detailed way

  1. Put all your website files in a .zip file (.rar doesn’t work, I tried). I made a sample website in a .zip file by modifying Amit’s content, you can download it here if you don’t have any zipped webpages kicking around.
  2. Open the Google Script page and upload your .zip file.
  3. Hit upload file, and you should see this:
  4. Enjoy your free web hosting!

Hosted website on Google Drive

If you’re learning to host a site on Google Drive out of curiosity, you probably aren’t satisfied with having all the work done for you with a script. Unfortunately for you, it’s not particularly techy or in-depth, it just has more steps.

  1. Create a new folder in Google Drive
  2. Upload the contents of your website’s .zip file and move them to the folder.
  3. Right click the folder and choose ‘share’, then ‘advanced’ at the bottom of the popup.

  1. Choose ‘Public on the web’ and save.

  1. After hitting save, you’ll be given a public link but it will be a link to the folder your .html files are stored in on Drive, not an actual website.
  2. So the next thing we need to do is to change the link. Cut out the string of letters and numbers between id= and &usp, and paste it at the end of
  3. Navigate to your new link, and you should see your web page!


To start, I’m not entirely sure how long this functionality will remain in Google Drive. It’s not a well-publicized feature, and so it probably also isn’t very highly utilized. Google tends to get rid of things that aren’t highly utilized, so we’ll see how long this lasts.

In addition, this hosting solution should only be used for rapid prototyping. DO NOT host your website on Google Drive permanently and tell all your friends to go visit that link, because it probably isn’t as secure as actually hosting your website on a dedicated or shared hosting site. This should only be used for personal or internal development purposes