Hosting your Websites on Google Drive

The article below explains how you could host your website on Google Drive. IFRAME allows you to publish Drive website as a custom web domain.

Google Drive is a good alternative choice if you are in an urgent need for a place to host your website but don’t have any web server available. Google Drive lets you host a simple and complex website with JavaScript based web apps.

It allows you to upload and publish any kinds of static contents, including HTML pages, images, CSS, icons, audio and video files including podcasts.

Free Web Hosting with Google Drive

It is quite easy to host websites on old Google Drive. Upload all your websites files into one folder inside the Drive. Assign the sharing permissions of that particular folder as ‘Public’. You can obtain the URL of your website by opening the index.html file in the Google Docs viewer and then clicking the ‘Preview’ link.

However, the upgraded Google Drive doesn’t have the facility to host your website. Google has dropped this web hosting feature in the new Google Drives. The Drive still allows you to create ‘Public Folder’ within your drive and make it visible to all. Yet the option to display it as a website is currently removed.

However, this is not the entire case. There is still another cross-road to publish your websites in the Google Drive in just a few steps.

From Desktop to Google Drive in one step

First, you will need to assign all your files into one zip file and then upload it to the Drive. Once this uploading is complete, the tool will help you to generate the public URL of your website.

For those who are using the tool for the first time, might have to give permissions to upload that zip file to your Google Drive.

The little Google Script will actually do everything you need to do, making your work a lot easier. The app creates a public folder, saves your files over it, makes it visible to all, and generates the googledrive.com URL using the ID of the new folder.

But, it is better if you know few things beforehand you host the websites on Google Drive.

• Ou should have an index.html sine this is what will be given when your website is accessed.

• You cannot change the URL structure, it will always be like googledrive.com/host/.

Google Drive Websites on Custom Web Domain

There is no direct way to host your website under Google Drive and have it run under a custom domain at the same time.

You will have to perform the following trick to get the work done this time. You have to wrap your Google Drive website URL inside an IFRAME tag as shown in the following snippet:

<style>
body { margin:0; padding:0; }
iframe { position: absolute; height: 100%; width: 100%; }
</style>

Google Drive Website

<iframe src=”https://googledrive.com/host/ABCD/” width=”300″ height=”150″ frameborder=”0″></iframe>

You must set the attributes of the height and width of the IFRAME to 100% so that the Google Drive screen can occupy the entire screen. 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. This is the only disadvantage here.

It is also possible to host custom Facebook Pages over Google Drive as the Drive serves your website over HTTPS. And Facebook only requires that custom pages are only served over secure HTTP.

It is not possible to use Google Drive to host dynamic pages. For example like those generated through PHP scripts on a WordPress website.

Leave a Reply

Your email address will not be published. Required fields are marked *