The Google Drive Hosting Trick That Stopped Working

The Google Drive hosting trick died in 2016 and old tutorials still tell you to try it. Here is what Drive does with your HTML now, and where to put it instead.
The OxyPages Team · · 9 min read
You put an HTML file in a Google Drive folder, set it to "Anyone with the link", and sent the URL to someone. They got a download prompt. Or a screen full of raw markup. Or a preview panel with none of your styling in it.
Nothing is wrong with your file.
The thing you were trying to do stopped existing in 2016. For a few years Drive really could serve a folder as a website. You dropped an index.html into a public folder and Google handed you an address that rendered it as a page. That feature is gone. The tutorials describing it are not.
So you follow a guide written in 2014, do every step correctly, and end up staring at a download dialog wondering what you got wrong.
Here is what happened to the Google Drive hosting feature, what Drive genuinely still does with an HTML file today, and where to put the file so the link opens a page instead of saving one.
TL;DR: Google deprecated web hosting in Drive on 31 August 2015 and switched it off on 31 August 2016. Since then Drive stores your HTML file and previews it as source code. It does not run it, and no URL trick brings the old behaviour back. Dropbox removed its version of the same feature between October 2016 and September 2017, so this was a category decision, not just a Google one. To get an address that renders a page you need a static host, and Netlify, Cloudflare Pages and GitHub Pages all do that free in about a minute.
If you only want the fix, hosting a single HTML file is four steps and takes about a minute. The rest of this is why your Drive link behaved the way it did, and what Drive is still the right tool for.
What Happened To The Google Drive Hosting Feature?
Google announced the deprecation on 31 August 2015 and shut the service off exactly one year later, on 31 August 2016.
The notice is still up on Google's own blog. Web hosting in Drive was deprecated for users and developers that day, Google Apps customers were given twelve months of grace, and after 31 August 2016 the serving URLs stopped working. Google's deprecation notice for web hosting in Drive
The addresses looked like googledrive.com/host/FILE_ID, and there was a drive.google.com/host/ form of the same thing. If a tutorial you are reading contains either of those strings anywhere, it was written before September 2016, and every instruction after "make the folder public" is describing a product that no longer exists.
Google's stated reason was competition, more or less. From the announcement: "a wide variety of public web content hosting services have emerged, and we think better options are available to people today."
My own read, and I cannot prove this half, is that free arbitrary HTML and JavaScript served from a google.com address is a phishing kit with a trust badge stapled to it. Either way the outcome is the same. It is not coming back, and no setting in your Drive account turns it on.
What Google Drive Actually Does With An HTML File Today
It stores the file and shows you the source code. That is the entire feature.
Google's own list of previewable file types puts .HTML in the markup and code group, next to .CSS, .PHP and .C. Google's list of file types you can preview in Drive Everything in that group previews the same way: as text a human can read. Drive is showing you the file. It is not running it.
Here is the honest matrix of what a Drive link can and cannot do.
| What you want | What Drive gives you | Renders as a page? |
|---|---|---|
| Send one file to one person | A share link to a preview screen | No, HTML shows as markup |
| Force a straight download | drive.google.com/uc?export=download&id=FILE_ID | No, it lands in their Downloads folder |
| Show a PDF in the browser | A real in-browser PDF viewer | Yes, PDFs preview properly |
| Show a photo or a video | A real in-browser preview | Yes |
| Serve a web page at a URL | Nothing, since August 2016 | No |
That download URL is worth knowing, because it is the one genuinely useful link trick Drive has left. Take the file ID out of the share link, drop it into https://drive.google.com/uc?export=download&id=FILE_ID, and the file downloads instead of opening a preview screen.
It still is not hosting. The other person ends up with a file on their disk, opening it from a file:// address that only works on their own computer. That is exactly where you started, one machine over.
The Detail That Would Break It Anyway
Even if Drive did render your markup, one web page is rarely one file.
If your page contains <link href="style.css"> or <img src="images/logo.png">, the browser resolves those paths against the folder the page came from. A Drive share link is not a folder. There is no style.css sitting next to it at a predictable address, so your styling and every image would fail even in a world where the HTML rendered.
That is why the old feature served a whole public folder rather than a single file. It is also why "just find the raw file URL" was never going to be the workaround, no matter how many forum replies suggest it.
Dropbox Removed The Same Trick

This was not only Google. Dropbox ran the same play a year later, in three steps.
- 3 October 2016: Dropbox Basic accounts, the free ones, could no longer use public links to render HTML in a browser.
- 15 March 2017: the Public folder was converted into an ordinary folder.
- 1 September 2017: Plus and team accounts lost HTML rendering too, and Public folder sharing was disabled outright.
Dropbox still documents all three dates on its own help page, which is more than most companies manage. Dropbox on the changes to the Public folder
So if you are wondering whether some other sync service will do it instead, the honest answer is that the whole category walked away from this inside about two years. Syncing files and serving web pages are different jobs with very different security models, and the companies doing the first one decided they did not want the second.
Three Things People Actually Want From A Drive Link
Not everyone who lands here is trying to publish a site. There are three separate jobs behind the search, and Drive is still right for one of them.
Sharing A File With A Person
Drive is excellent at this and you should keep using it. A link that does not expire, permissions you control, revoke access whenever you like, and a working preview for most formats people actually send each other. None of this post is a criticism of Drive as Drive.
Embedding A Drive PDF In A Web Page
This one half works, and the half that fails is the half everybody tries first.
Drop the /view share link into an iframe and the browser refuses to display it. Drive sends an X-Frame-Options header on that page, and the console tells you the frame was refused because the header is set to SAMEORIGIN.
The supported URL is the preview endpoint, not the share link:
<iframe src="https://drive.google.com/file/d/FILE_ID/preview" width="640" height="480"></iframe>
That works, with two conditions. The file has to be shared so anyone with the link can view it, or your visitors hit a Google sign-in wall instead of your document. And you get Google's viewer chrome wrapped around the file rather than a clean embed you control. If you want a PDF sitting at a plain address of your own, give the PDF its own URL rather than borrowing somebody else's viewer.
Putting The Link Somewhere Public
A Drive URL looks like drive.google.com/file/d/1aB2cD3eF4gH5iJ6kL7mN8oP9qR/view?usp=sharing.
You cannot read that down a phone. You cannot print it on a card. It carries Google's brand rather than yours, and it breaks the moment the file is moved, renamed, or has its sharing settings changed by someone tidying up. Anything a stranger has to type, trust, or remember needs a real address.
What To Use Instead
Anything that does static hosting, which is a crowded and mostly free market. The differences that matter are how you upload and what you have to sign up for.
| Host | How you upload | Account needed | Custom domain on free tier | Best when |
|---|---|---|---|---|
| Netlify Drop | Drag the folder onto the page | Not for the first deploy | Yes | You need a working link in the next minute |
| Cloudflare Pages | Drag a folder, or connect git | Yes | Yes | You want it free and permanent |
| GitHub Pages | Commit to a repository | Yes, plus git | Yes | You already use git and the repo can be public |
| Vercel | Drag the folder, git, or the CLI | Yes | Yes | The page will grow into an application later |
| OxyPages | Drag the folder or a ZIP | Yes | Paid plans only | You want editing and forms without touching git |
If your page needs PHP, WordPress or a database behind it, none of those five will run it, OxyPages included. That is a different kind of hosting, and no amount of drag-and-drop makes a static host execute server code.
For a page you have to show someone this afternoon and will delete next week, Netlify Drop is the shortest path that exists, and the first deploy does not even need an account. For something that has to sit at one address for years without you thinking about it, Cloudflare Pages and GitHub Pages are both free and both fine. What the free tiers actually restrict is the comparison worth reading before you pick one.
What To Do Next
Five minutes, in this order.
- Close the 2014 tutorial. Everything past "make the folder public" refers to a feature that was switched off on 31 August 2016.
- Put your
.htmlfile and everything it references into a single folder, with the main page namedindex.html. - Drag that whole folder onto a static host. The folder, not the one file, or your stylesheet and images arrive missing for the same reason they would have on Drive.
- Open the URL you get back on your phone, on mobile data. Your laptop still has the local copy cached and will lie to you about whether it worked.
- Keep using Drive for the thing it is genuinely good at, which is handing a file to a person.
Drop the folder into OxyPages if you want the page editable afterwards without a redeploy, or take any of the others in the table. All of them beat the workaround you were about to spend an hour on.
If the file came out of an AI tool rather than a text editor, the shape of what you were handed matters. Putting a Claude page online covers that case, because some tools give you one finished file and others hand you a project that has to be built before it can be served.
FAQ
Can I Still Use The Google Drive Hosting Trick In Any Form?
No. The serving endpoints were switched off on 31 August 2016 and nothing inside Drive replaced them. Direct download links, folder IDs and "raw file" URL patterns all hand the browser a file to save rather than a page to render. Anything you find claiming otherwise is describing the pre-2016 product, usually in a post that has not been touched since.
Why Does My HTML File Show Up As Code In Drive?
Because that is Drive's preview behaviour for markup and code files, and Google lists .HTML in exactly that group alongside .CSS and .PHP. It is doing what it was built to do. To see the page render, download the file and open it in a browser, which gives you a file:// address that works only on your own machine.
Does Publish To The Web In Google Docs Still Work?
Yes, and it is the thing people most often confuse with the old feature. In Docs, Sheets or Slides, File then Share then Publish to web gives you a public URL for that document. It publishes a Google document, though, not your own HTML, CSS and JavaScript, so it is not a substitute for a host.
What Should I Use Instead Of Google Drive For Hosting A Page?
Any static host. Netlify Drop for speed, Cloudflare Pages or GitHub Pages for a free permanent address, or a drag-and-drop host if you want to edit the page later without redeploying. All of them do in about a minute what the Google Drive hosting feature used to do, and unlike Drive, they are actually built to serve web pages.