Google Drive doesn't just host files and folders. You can also use it to host your website.
Note: However, Google Drive does not support web resources that make use of server-side scripting languages like PHP.
Here's how:
1)Create a public file folder.
2) Put your website i.e.the HTML, CSS, Javascript files inside it.
3)Open the HTML file and preview it.
4) Share the URL that looks like "www.googledrive.com/host/..." from the preview window.
To create a public folder: For this, you simply need to go to folders, create a new folder, and rename it to whatever name you want. Following which, you select the checkbox next to the New folder. Click the "Sharing settings" icon. Then click "Change" and make your folder "Public on the web".
If you are using Google Drive on your desktop then simply move your folder into the Google Drive Folder.
NOTES:
a) If you're using any external files in your website, like a JavaScript library or a web font hosted elsewhere, link to the secure version of that file (if possible). By default, Google Drive sites redirect to HTTPS, and any insecure links may visitors ‘security warnings’ on the website.
b) If you do not start with an “index.html” file, then the site visitors will not see a website. Instead they will get a directory listing of all the folders in the website. So be sure to include it.
Opening and previewing HTML file: Click on the index.html page. Drive will open the file. Click on the "Open" button at the lower right corner of the screen.
Sharing the URL: Now that you have your URL, simply share with all you know!!
And voila! Your website is live and running.
Note: If you wish to assign a custom domain to this site, note that Google Drive sadly doesn’t allow you to set the DNS values. But you can have an index page which contains a single iframe fetching content from this URL and set its width and height to 100%.
(The author is a contributor to Digit and runs a blog called www.tech4every1.com)
No comments:
Post a Comment