I have made a page in html5 with css3. It works fine on local (I dont use any server, just doubleclick in the index to open it).
I want to put it in google drive. I have load all the documents needed, but when I try to open the html, I can only see the text (I mean, it is not being executing, I can see just the source code).
Any suggestion?

- 34,866
- 14
- 107
- 142

- 671
- 1
- 5
- 7
-
Did you save it with htm or html extension and have configured IE or other browser to open it when clicked? – Subir Kumar Sao Aug 02 '12 at 11:21
-
I have save it with html extension. I've tried to open it with a browser, but when i click in "open with", i can only pick "Google Drive Viewer" or "more apps", and there, I havent any browser (are google apps) – Ane Hervías Caballero Aug 02 '12 at 11:24
-
I could publish it, but it doesn't understand the folders with the css information, images, etc. (probably it doesnt understand the relative paths) Any idea? – Ane Hervías Caballero Aug 02 '12 at 16:17
-
1Check this out https://support.google.com/drive/answer/2881970?hl=en As simple as that. :) – Ishaan Kumar Jul 15 '15 at 21:18
-
6This feature will be closed by Google on August 31st , 2016 – BipinSasi Mar 04 '16 at 13:11
9 Answers
Not available any more, https://support.google.com/drive/answer/2881970?hl=en
Host web pages with Google Drive
Note: This feature will not be available after August 31, 2016.
I highly recommend https://www.heroku.com/ and https://www.netlify.com/

- 1,007
- 11
- 26
-
-
many of other free hosting (only for dev/test envs), for me https://www.netlify.com/ does the needed – Mahmoud Hboubati Nov 15 '16 at 04:34
-
3google sites isn't bad, and uses a similar account and authentication infrastructure: https://sites.google.com/ – nealmcb Dec 22 '16 at 16:50
EDIT: As of August 2016 Google Drive can no longer be used to host static web pages, so this solution no longer works.
- Create a new folder in Drive and share it as "Public on the web."
- Upload your content files to this folder.
- Right click on your folder and click on Details.
- Copy Hosting URL and paste it on your browser.(e.g. https://googledrive.com/host/0B716ywBKT84AcHZfMWgtNk5aeXM)
- It will launch index.html if it exist in your folder other wise list all files in your folder.
-
4It seems like Drive no longer opens `index.html`, even if that file exists. I only get the file listing page. – appas Aug 30 '15 at 19:45
-
@appas It still works, just make sure you modify the URL in step 4 with the folder ID. – Christopher Markieta Nov 30 '15 at 19:35
-
9FYI - looks like this feature is being deprecated and will be discontinued in August of 2016. See: http://googleappsupdates.blogspot.com/2015/08/deprecating-web-hosting-support-in.html – mlerley Dec 30 '15 at 18:21
-
1
-
12
I don't think it is necessary to "host" the content using the way from the accepted answer. It is too complicated for a normal user with limited developing skills.
Google actually has provided hosting feature without using Drive SDK/API, what you need is just few clicks. Check this out:
http://support.google.com/drive/bin/answer.py?hl=en&answer=2881970
It is the same to the answer of user1557669. However, in step 4, the URL is not correct, it is like:
https://drive.google.com/#folders/...
To get the correct host URL. Right click on the html file (you have to finish 1-3 steps first and put the html in the public shared folder), and select "Details" from the context menu. You will find the hosting URL right close to the bottom of the details panel. It should look like:
https://googledrive.com/host/.../abc.html
Then you can share the link to anyone. Happy sharing.

- 2,381
- 6
- 29
- 44
-
1I can't publically share the folder anymore. When copying the URL of the index.html file, and opening it in private mode, I still can see only the text document, not the web page – maycca Oct 04 '17 at 18:40
Now you can use https://sites.google.com
Build internal project hubs, team sites, public-facing websites, and more—all without designer, programmer, or IT help. With the new Google Sites, building websites is easy. Just drag content where you need it.

- 3,049
- 1
- 34
- 45
-
1yes, the site file is saved in gdrive just like html file, except that it is wysiwyg – Dee Jan 20 '20 at 03:41
While drive allows you to edit plain text and HTML files I don't believe they allow the HTML to actually be displayed. I don't think they want people hosting websites from their drive space.

- 1,032
- 3
- 11
- 17
A lot of the solutions offered here do not seem to work anymore. I'm currently on a chromebook and wanted to view an HTML5 banner. This seems impossible now through Google Drive or other apps (as mentioned in previous comments).
The method I ended up using to view the HTML5 was the following:
- Open Google Adwords (create a free account if you dont have one)
- Click on Ads in the top panel
- Click on "+AD" and choose image ad
- Choose "upload an ad"
- Drag and drop your zip file into the area
- Click on Preview
- Voila, you will see your HTML5 banners in their full beauty
There may well an easier way, but this way is pretty good too. Hope it helps and worked well for me.

- 95
- 1
- 3
- Create a new folder in Drive and share it as "Public on the web."
- Upload your HTML, JS & CSS files to this folder.
- Open the HTML file & you will see "Preview" button in the toolbar.
- Share the URL that looks like www.googledrive.com/host/... from the preview window and anyone can view your web page.
Find and install "Application Launcher For Drive (by Google)" from Extensions. This opens Drive files directly from your browser in compatible applications installed on your computer. If your default application is Chrome for HTML, you should be able to open it.

- 1
Found method to see your own html file (from here (scroll down to answer from prac): https://productforums.google.com/forum/#!topic/drive/YY_fou2vo0A)
-- use Get Link to get URL with id=... substring -- put uc instead of open in URL

- 2,492
- 2
- 22
- 31
-
It seems this does not work as intended (anymore?): it offers a download dialog instead of parsing and displaying the file. – appas Aug 30 '15 at 19:51