Host plain HTML webpages on Google Drive - gHacks Tech News

Host plain HTML webpages on Google Drive

You probably know that you can host basic HTML websites on Dropbox using third party services like site44. Google recently announced that it has added similar capabilities to its cloud storage service Google Drive.

The core difference between the implementations is that you do not need a third party tool to host a plain HTML website on Google Drive, while you do if you want to host your website on Dropbox.

There is actually not a lot to it to publish webpages on Google Drive. All you need to do is follow these simple steps to do so:

  • Create a new folder on Google Drive, name it accordingly and share it as Public on the web. This is done by selecting the newly created folder and clicking on the Share button that is next to New Folder. Click on the change button next to Private - Only the people listed below can access and switch from Private to Public on the web.

public on the web

  • Copy at least one HTML file into the folder. You can also use JavaScript files and CSS files and reference them in the HTML files.
  • Open the HTML file to see a preview button on the toolbar and click on it.
  • Share the url that is displayed, starting with www.googledrive.com/host/ or keep it for yourself.
  • Keep in mind that the pages are publicly accessible for anyone knowing the web address.

google drive host webpages screenshot

Note that you can use relative links to link directly between HTML documents that you store in the folder. This basically means that you only need to reference the file name of the image, HTML, JS or CSS file instead of the full path that points to it.

While you are limited to static HTML pages more or less, you can use the free website hosting for a number of things. You can for instance export your bookmarks file to HTML and publish it on Google Drive, create a HTML file that links to all of your public downloads on the site, or make information available that you consider important.

The main advantage that Google Drive's web hosting implementation offers to you is that you can use it right away. What's less than ideal is the long random url that you need to share. You probably can get around it by pointing a domain name to the directory on Google Drive.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. GDrives said on February 8, 2013 at 4:03 am
      Reply

      If you’d like to have a nice short URL, create your alias at: gdriv.es

    2. syed said on February 8, 2013 at 8:26 am
      Reply

      Here i have a very Naive question, what if there could be any way , google drive or drop box or any other such online space could be used to run and install Databased and CMS systems, it will seriously revolutionize the entire industry…

      Just a thought…

    Leave a Reply