7

I have spent hours to trying to host some of my local HTML pages with Google Drive.

I was following the instructions as given in https://www.ecanarys.com/Blogs/ArticleID/135/How-to-Host-your-Webpages-on-Google-Drive, however without any success.

So far the steps I followed -

  1. Created a folder in the Google drive

  2. Uploaded all files and folders including the HTML, CSS and other required files using drag-and-drop facility

  3. Changed the sharing option to 'Anyone on the internet with this link can view' attached shanpshot enter image description here

  4. Next I go to the required HTML page and click Preview enter image description here

  5. As per the instruction, I should get some link to display the page through Browser. However I just see the source-code.

Could you please help me the right way to host my HTML page with Google-Drive.

Any pointer will be highly appreciated.

Bogaso
  • 2,838
  • 3
  • 24
  • 54
  • 1
    Why do you want to host your HTML with Google Drive? Have you considered other solutions like [GitHub Pages](https://pages.github.com/)? – timtim17 Sep 05 '20 at 09:19
  • Yes. AFAIK, github dont allow to host multiple HTML pages. I have 4 different HTML pages which share the same CSS and JS files. If Github allows to do so, I am fine to explore that as well. – Bogaso Sep 05 '20 at 09:25
  • 1
    If you have all of your code in a repository, you can access all of them using realtivel inks. For example, `username.gthub.io/my-repo/first.html` and `username.github.io/my-repo/second.html`. – timtim17 Sep 05 '20 at 09:27

1 Answers1

17

The web hosting abilities was deleted from Google Drive.

Please see the following G Suite Blog Post to better understand the issue you are challenged with. Deprecating web hosting support in Google Drive

But you can use Github for hosting a static HTML site. If you have all files into a repository, you go to setting of this repo

enter image description here

Then go to the Github Pages section.

enter image description here

Then select the master branch and directory of index.html file and save it. In my case, its root directory.

enter image description here

After that, you will get a URL in this section.

enter image description here

For Github hosting, you can follow this instruction.

Bappi Saha
  • 404
  • 4
  • 10