How to use google drive as web hosting

How to Host a Website on Google Drive for Free

We’re a big fan of cloud services on this blog, and Vinay has written on Process Street about Dropbox vs Google Drive in the past as well as a great guide on how to migrate to the cloud.

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. It comes in the form of a Google Script written by an expert in the field, Amit Agarwal. First I’ll show you this way — the easy way — then I’ll explain how you can do it without the script.

How to Host a Website on Google Drive using a Google Script

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.
host website with google drive script

3. Hit upload file, and you should see this:

Host a website using Drive width=

4. Enjoy your free web hosting!

hosted website on Google DriveThe Hard(er) Way

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.

Hosting a website in Google Drive Sharing

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

Make hosted website public on Google Drive

5. 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.

How to host a website on Google Drive Sharing Link

6. 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

How to host a website on Google Drive Link

7. Navigate to your new link, and you should see your web page!

For a video tutorial on how to host a website on Google Drive see below:

Bonus tip:

If you’re not a fan of your huge and ruthlessly forgettable URL, there’s always, a service for people serious about hosting with Google Drive that allows you to use your own URL, unlimited sites and free SSL. Other options for using your own domain are impractical, hacky or unprofessional, such as frame forwarding or using a shortening service like GDrives. For now, it seems like is the best option we’ve got.

To learn more about Google Drive, check out 25 Google Drive Tips You’ve Probably Never Heard Before. Google Drive is a great way to host simple sites, but if you’re looking to build a blog for your company, you should see this post.

Preconfigured and Click to Deploy

WordPress on Compute Engine

Deploy WordPress, a website creation and publishing platform, to Google Cloud with a range of hosting options.

View pricing

  • Blogs

  • Simple websites

  • Best for low to medium traffic

  • Open-source content management system

LAMP stack on Compute Engine

Deploy a development stack featuring Apache HTTP Server, MySQL, and PHP on Compute Engine. 

View pricing

  • Linux, Apache HTTP Server, MySQL, and PHP

  • Host websites and web applications

  • Dynamic content

Static websites

Firebase Hosting

Deploy static content to a global CDN with a single command. Get started with the Firebase Hosting guide.

View pricing

  • End-to-end HTTPS serving for custom domains

  • Web apps and static content

  • Global CDN

Dynamic websites

Cloud Run

Develop and deploy your favorite language and framework on a fully managed serverless platform that scales automatically.

View pricing

  • Go, Python, Java, Ruby, Node.js, and more

  • Access SQL database on Cloud SQL

  • Autoscaled HTTPS endpoint

  • Fully managed infrastructure

If you want to host your webpages quickly but don’t have any web sever to host, then google drive is a greate alternative. You can use Google Drive to host your basic websites or even complex javascript based web app like angularJs, backbone, etc. You may publish any kind of static contents on your website including HTML pages, images, CSS, icons, audio and video files.

Steps to be followed:

  1. Create a folder in google drive.
    Google Drive web hosting
    Google Drive web hosting

  2. Share the folder permission to “public on the web”.
    Google Drive web hosting
    Google Drive web hosting
    Google Drive web hosting

  3. Before uploading any files into the folder please make sure “convert uploaded files to google doc format” is not selected in settings. To check the settings please click settings icon and click Upload settings and uncheck convert uploaded files to google doc format.
    Google Drive web hosting

  4. Now you can drag and drop html, javascript, css and image files into the folder inside Google Drive.
    Google Drive web hosting

  5. Once the file has uploaded, now select index.html file and right click and select open with Google Drive viewer or Open the index.html file and click Open in the bottom-right corner.
    Google Drive web hosting

  6. Now click Preview button that will generate the public URL of your website.
    Google Drive web hosting

  7. Your share url looks like this
    Google Drive web hosting


Tips: Google Drives serves your website over HTTPS and thus can be be used for Facebook apps hosting, since Facebook requires that custom pages are only served over secure HTTP.



Note : You can’t use Google Drive for dynamic web pages generated by PHP scripts and etc.



Thanks to Jayavanath Hosatti



Serverless Web Hosting

By signing in, you agree with the Terms .

DriveToWeb lets you host web sites on cloud drives. You don’t need to maintain a server anymore. How?

DriveToWeb liberates website creation by enabling you to quickly spin up full HTML sites (CSS, Javascript, and media files included) using files stored on popular cloud drives, such as Google Drive and Microsoft OneDrive. Enterpreneurs, developers, educators and students all over the world find great advantages using DriveToWeb over conventional web hosting services. Publishing becomes a simple 3-step process:

  1. Upload your website folder to Google Drive or OneDrive;
  2. Share that folder for public access;
  3. Sign-in above and obtain links to your content.

We ask for your generous donation to keep this service running for countless educators, students, non-profit organizations and web enthusiasts. Thank you in advance for your support.

You can buy, transfer, and manage your domains and directly connect with website builders like Shopify, Squarespace, Weebly, and Wix. You can add up to 30 extra email aliases for each user at no extra cost.


Important: Google Domains isn’t available in all countries, regions, or languages. Learn where Google Domains is available.

You can use Google Domains with the latest or second-most recent versions of these web browsers:

  • Google Chrome
  • Firefox®
  • Safari®
  • Microsoft Edge™

Tip: Make sure you keep your web browser up-to-date. Each time a new browser version is released, we begin support of the most current version and stop support of the third-most recent version.

How it works

When you use Google Domains as your web registrar, you can:

  • Search for available domains.
  • Buy domain names.
  • Transfer domains you already own from other registrars.
  • Transfer domains between owners within Google Domains.
  • Manage and renew domain registration.
  • Create up to 100 forwarded email addresses per domain.
  • Integrate with web hosts to create and improve your domain’s web presence.

Purchase a domain

You can create and manage your domain to fit your specific needs:

  1. Create a plan for your domain.
  2. Buy a domain name.
  3. (Optional) Build your website.
  4. (Optional) Set up your email.
  5. Get the word out.

Related resources

Written by Jane