Plenty of things you can do while you do have one Google account. Having Google account gives you a complete cloud infrastructure, known as Google Drive. The core advantages of using such cloud services are anywhere accessibility of your stored documents and media, collaborative work, cross platform availability and easy sharing to the world.
Google Drive offers one exciting feature called, web hosting! Yes, you read it right. You can store your complete a web site or an HTML page built using javascript and css files. Above all, it's free!
This is useful for web developers like me who frequently need to demo to their clients. However, it should not be considered as a comprehensive web solution to host a website. It is useful for the "short lived" events like invitations and prototype presentations of the projects on which you are working. Check this live demo page I created and hosted on Google Drive.
Learning how to host a website over Google Drive requires 3 easy steps. The steps can be summarized in 3Ps - Prepare, Put & Publish.
Lets see each of them one by one here below.
Lets see each of them one by one here below.
- Prepare
Prepare all your HTML files and their related images, javascript and css files, if any, in a single folder. Keep paths relative for all javascript, css and image files. Let say you are keeping all your image files under image folder, javascript files under js folder and css files under styles folder. In that case your relative paths will look like following.<img src="images/googledrive.png" width="100%"> - Put
Once you are done with preparing your website or webpage in a separate folder upload the same to your Google Drive account. There are two ways to upload folder in to your Google Drive.
If you've installed Google Drive on your desktop then simply put the website/webpage folder in your Google Drive folder.
In case, if you don't use Google Drive desktop then use Google Drive website. To upload the folder login into your account and hit the upload button beside the Create button on left side. - PublishUp to this step only you can view the HTML pages you uploaded but not the world. To make it available to the world you've to change the sharing permission settings.
Select the folder you just uploaded and hit the Share button.
You're all set for your first Google Drive hosted website. Now, open the home page of your website in the google drive website generally home page named as index.html. Google Drive will open your page in a lightbox. Hit the Open button in the bottom of the lightbox.Once the page loaded, hit the Preview button from the toolbar. It will take you to the live webpage.