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.








great man thanks for your help
ReplyDeleteHappy to help, Shubham. Share with your social media friends also.
DeleteGreat article! I know there is also a workaround to getting a custom domain for your Drive hosted website. Wrote an article about it a while ago http://thevrincent.blogspot.com/2013/09/how-to-host-html-websiteand-everything.html
ReplyDeleteThanks Achim Scarlat! You too have very well written the topic! Keep it up.
DeleteActually, I intentionally left the custom domain part because the url in the address bar will not be changed when we navigate among different pages in the Google Drive hosted website!
The wonderful article which is very essential for me as well. I am sure the article will be very essential for me as well. Keep it up. Thanks!!!!
ReplyDeleteTheresa
After reading the article i have known that Installing Pyramid on a shared hosting platform it is a one of the great article which is very essential for me as well. Keep it up.
ReplyDeleteweb hosting
i am not able to do that..i have followed all the steps...can anyone make it more clear....
ReplyDelete