Host Website on Google Drive

Many of you are looking for a place to quick and freely host your websites but don’t have access to any web server, Google Drive is a great place to do it. You can use Google Drive to host basic (Static) websites or even complex JavaScript based web apps. You may publish any kind of static content* on your website including HTML pages, images, CSS, icons, audio and video files.

Google Drives serves your website over HTTPS and thus can be be used for hosting custom Facebook Pages.

How to Host your Website on Google Drive?

The official procedure for hosting websites on Google Drive involves a couple of steps.

  • Create a new folder in Drive and share it as “Public on the web.”
  • Upload your HTML, JS & CSS files to this folder.


  • Open the HTML file & you will see “Preview” button in the toolbar.
  • Share the URL that looks like… from the preview window and anyone can view your web page.

Public Google Drive Websites with different Web Domain

I’ll show an example here. This website is hosted on Google Drive and here’s the same website but hosted on a different web domain. The trick is easy – you just have to wrap your Google Drive website URL inside an IFRAME tag as shown in the following snippet:

The height and width attributes of the IFRAME tag should be set to 100% for the Google Drive website to occupy the entire screen. The only downside is that the URL in the address bar won’t change if you open a different page of the website since you are now browsing inside an embedded page. ↓

Note :-  Google Drive cannot be used for serving dynamic pages like those generated through PHP scripts on a WordPress website.

Manikandan is Founder and author of codenread. Tech Blogger by Passion | Computer Science Engineer by Qualification