Menu Close Menu

How to host your web page content on google drive

Google Drive

Google has added a new feature to Drive: You can now serve up web content from within your Google Drive folder, even ones that run JavaScript. All you need to do is upload your HTML files and assets (e.g., images) and make them public. The Google Developers site has more details on publishing a folder as a website, but essentially, besides having the folder and site assets public, you also need to link to the files in the folder using a "web View Link" code. If you don't have an index.html file in the folder, Drive will display a list of the folder's contents.

 

Now you can't host dynamic websites on Google Drive. Nothing that requires server-end computing. Technologies like PHP, ASP ETC require back-end processing, so they can't run. You can only host simple, static websites that are HTML, CSS, and JavaScript driven.

Now you could use this just like you'd use Google Pages or code.Google.com for a similar purpose. But Google Pages has been replaces with Google Sites, and no longer supports direct uploading, which is kind of a let-down, because we need to directly upload webpages in order to test them on Google Drive. Google Code, on the other hand, has bandwidth issues. Hence, Google Drive is the best option you have for hosting your static website.

 

The requirements to publish are:

  1. The folder containing site assets must be public. Assets added to public folders must also be public on the web.
  2. Link to the files contained in the folder using the web View Link folder ID plus the path to the file.

To host a website on your Drive, log into your Google Drive account from a web browser, and create a folder. What's important is the permission you set on that directory. This directory will host your web files, so it needs to be shared with the public, or else, no one will be able to see it.

Now that you've created a folder to host your files, it's time to put the files in. Upload all your web files in this folder. Now, you need to share it with the public.

To do this,

right click on the folder>> and then click on>> Share

image

 

Now, look under the "Who has access" section, and change the setting from Private to "Public on the web". Then, copy the link given on top. You'll need it for the next step.

The URL you just copied is the link to your shared file, and not to the hosting. There's a Some adjustment you need to make in the URL. The link you copied something like this: https://docs.google.com/folder/d/link-to-your-site.

You have to change it to https://googledrive.com/host/link-to-your-site.

For More instruction check out this page Google Instruction.

image

Now You are done!

I hope Steps are extremely Simple/easy if you have any trouble feel free to post any query below in comment box I will loved reply back as soon as time allow….. Thanks for reading our post… happy blogging….

"Be the first to express your thoughts" :

  1. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. This comment has been removed by a blog administrator.

      Delete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete

Important - Make sure to click the "Subscribe By Email" link below the comment for to be notified of follow up comments and replies.If you use Name/URL don't use keywords as your name. We love to hear from you! Leave us a comment.
To ensure proper display, HTML/XML/JavaScript need to be Encode first using this Encoder Tool Then paste the Encoded code here.