Hosting a website on Google Drive

In past years, I have had students create a website using HTML and CSS and then upload their site to a folder on Google Drive. The directions that I had in place for this do not work with the new Google Drive but it is still possible to do this:

  1. Create a folder on your Google Drive and publicly share it. I don’t think this works with anything but publicly shared folders but you could try it and see.
    HTMLTestGoogleDrive-publicshare
  2. Upload the HTML, CSS, image files, etc. into the folder created. Do NOT convert the files!
  3. Copy the ID from the link shown for the folder; i.e. https://drive.google.com/folderview?id=0B9SpIwhzRZ4odF9uVUdNZzRYcU0&usp=sharing, you would copy the part after id= and before &usp=sharing.
  4. The website would be located at http://googledrive.com/host/ID_copied_in_Step3/index.html. For example, the “Hello, World” site for the ID above, is located at http://googledrive.com/host/0B9SpIwhzRZ4odF9uVUdNZzRYcU0/index.html If the main page of your website is something other than index.html, this should be changed in the link.

As you can see, the link to the site is long and not easy to remember so I usually have students use a URL shortener for sharing. Google’s URL Shortener is a good choice especially for Google App schools because you can track how many times the link is used using your Google Apps account. I also recommend TinyURL because students can create a short URL that includes a custom name that makes sense without creating an account.