Hosting a web page from a drive

Every guide describing how to host a website from a storage drive is describing a feature that was withdrawn.

Serving web pages directly from a storage drive worked for years, then was withdrawn. The guides describing it remain, which is why people keep trying.

A drive preview screen with a download button instead of a rendered page.
A drive preview screen with a download button instead of a rendered page.

What happens now

Upload a page to a drive, set sharing to anyone with the link, and open it.

The file downloads, or a preview screen appears with a download button. The markup is never rendered.

That is by design. A drive is storage, and the feature that made it serve pages was removed because serving arbitrary user files as pages from a shared domain is a security problem.

Drive Static host
Renders the page No Yes
Address Long identifier Short and clean
Custom domain No Yes
Relative paths between pages No Yes
Good for storage Yes No

Why the guides persist

They were written when it worked, ranked well, and were never updated.

This is one of the more durable pieces of stale advice on the web, and it costs people an afternoon each time. If a guide describes this, check when it was written.

The proxy services

Services exist that take a drive file identifier and render it.

They work, and they add a third party between your page and its readers, for something a static host does directly, faster, with a better address and no dependency.

If one of those services closes, every link you published through it dies. That is a real cost for no benefit.

Even when it worked, the address was bad

Worth noting because it affects the alternatives too.

A drive address is a long opaque identifier. It cannot be typed, cannot be read aloud, cannot be printed on anything, and carries no information about what it leads to.

Relative links between pages do not resolve, so a small site with several pages never worked properly even when single pages did.

A drive identifier address beside a short hosted address.
A drive identifier address beside a short hosted address.

What to do instead

Publish the file on anything that serves static files.

The file works unchanged. The address is short and can be printed. Relative paths between pages resolve. Custom domains work.

Keep the drive for what it is genuinely good at, which is storing files you need to find again.

Put your own domain in front

Whatever host you choose, this is the part that lasts.

The page can be moved between hosts in an afternoon. The address cannot, once it is in messages and printed material. Setting up a domain at the start removes the question permanently.

For the surrounding ground, see A Google Drive alternative for sharing and Free HTML file hosting, compared.

.html file sitting on your disk drop Hosted page served over https get link Shareable URL opens on any device
A file on disk becoming an address that opens on any device.

Put it at an address

Stop following guides written before the feature was withdrawn, keep the drive for storage, publish the file on a static host, avoid proxy services, and own the domain.

Then the page renders, and the address is one you can say out loud.

Questions people ask

Can I still host a page from a drive?

Not as a rendered page. The feature that served files as web pages was withdrawn, and what remains is file storage with a preview and a download.

Why do so many guides say otherwise?

They were written while it worked and never updated. This is one of the more persistent pieces of out-of-date advice on the web.

What happens if I try?

The file downloads, or a preview screen appears with a download button. The markup is never rendered as a page.

Is there any workaround?

Services exist that proxy drive files and render them. They add a dependency on a third party for something a proper host does directly and better.

What should I use instead?

Anything that serves static files. The file you have works unchanged, and the address is stable rather than a long identifier.

Keep reading