Recently, Google added an exciting feature to Google Drive “web hosting!” It allows you to host a website build on html , css , js in google drive build a website. And did I mention that it’s free?
Yep, it’s just one of the little perks that comes with a Google account.
You can see the live demo of my sample web page hosted in google drive
In this post i explain you to host a website in google drive
- A google account
- Text editor / WYSIWYG editor for editing html / css / js
Step One: Prepare your website
Your relative path to a file within the same folder as your .html file is just the file’s name.
background-image: url(images/asvignesh.png); <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="icon" type="image/ico" href="images/favicon.ico" />
If you’re using any external files in your website, like jQuery library from google CDN or a web font hosted, link to the secure version(https:) of that file (if possible). if you have any insecure links your visitors may get security warnings when they visit your site
you can use any of the way to add your website to google drive but the fastest way to upload a folder to Google Drive online is with the Chrome browser, since Chrome allows you to upload whole folders.
Step Three: Make Your Site’s Folder Public
Once you’ve got your website’s folder in Drive, you’re just a few clicks away from publishing!
On the next screen, set the “Visibility Options” radio button to “Public on the web” and and Access to anyone “can view” , then press the green “Save” button.
Step Four: Get Your Page URL
Once you set the public access to the web folder you are ready to share your website , to share your website get the url
Go into your website’s folder through the web-based Drive interface and click on your index.html file. Drive will open the file in a lightbox screen. Click the “Open” button at the lower right corner of the screen.
The preview link will take you to your live page