Google Drive No Longer Offers Web Hosting
Well, Google has recently upgraded the Google Drive interface for everyone and, according to the support page, the web hosting feature is no longer available in the new Google Drive. You can still create public folders inside Drive but the option to publish that folder as a website is gone.
The good news however is that is still very much possible to host sites on Google Drive through Google Scripts without you having to write a single line of code. Here are the steps involved:
- Create your HTML website and put your HTML, JS, CSS, Images and everything else in a .zip file. Make sure there’s an index.html file in your archive.
- Go here, authorize the app and upload your website zip file.
The app will upload the file to your Google Drive, decompress the archive and generate a URL for your website, just like the original Google Drive. That’s it.
Internally, the app creates a folder inside your Google Drive, changes the sharing permissions to public (anyone can view, you can edit) and then generates the googledrive.com URL using the ID of the new folder.
There’s another workaround too. Open your Google Drive, click the “Gear” settings icon and choose “Leave the New Drive” from the dropdown. You can now publish website using the old method and then switch to the New Drive.