Guide
Share an HTML file on Google Drive as a web page
Updated 30 October 2026
Google Drive stores an .html file but does not serve it as a web page. Google ended web hosting in Drive in 2016, and today Drive treats .html as a code file. To show the page itself, embed the code in Google Sites, serve it from an Apps Script web app, or publish it on ashare.net for everyone on your company’s email domain: the same reach as a Drive link set to your organization, with the page rendered.
What Drive does with an .html file today
You can upload an .html file to Drive like any other file. Drive’s help lists .html under “Markup/Code”, next to .css, .js and .py, among the file types it can preview. It does not run the page as a site.
The sharing settings are the usual ones. General access is Restricted (only the people you add), Your Organization (work or school accounts only), or Anyone with the link. Whichever you pick, a reader who wants to see the page downloads the file and opens it from their own disk. Then each person has their own copy, and when you fix the report you send the file again.
Drive web hosting ended in 2016
Drive used to serve HTML at googledrive.com/host/<doc id>. Google deprecated that on August 31, 2015, and stopped serving content from those links on August 31, 2016. For websites, Google pointed people to third-party hosts; for developers, to Google Cloud Platform. Tutorials that still show googledrive.com/host links describe a feature that no longer exists.
Ways to render it inside Google
Embed the code in Google Sites
In Google Sites, choose Insert, then Embed, then Embed code, and paste the HTML. JavaScript must be inside <script> tags and CSS inside <style> tags. For a whole page, add a page with Full page embed. Then Publish. Under Share, a published site can be Restricted to specific people and groups, or Public; work and school accounts may have more options.
This suits a page that belongs on an intranet site. Each new version of the report means pasting the code again and publishing again.
Serve it from an Apps Script web app
Apps Script’s HTML service serves web pages. Put the HTML in a file of the script project and return it from doGet:
function doGet() {
return HtmlService.createHtmlOutputFromFile('Index');
}Then Deploy, New deployment, Web app. You choose who can open it: only you, users in your domain, any signed-in Google user, or anyone. Apps Script serves the page inside a sandboxed iframe, so links need target="_top" or target="_blank", and scripts and stylesheets must load over HTTPS.
This is the right tool when the page reads live data from Sheets or Drive. For a static report, it is a script project to maintain per page.
The options side by side
| Option | Does the page render | Who can open it |
|---|---|---|
| Drive file link | No; Drive treats it as a code file, readers download it | People you add, your organization, or anyone with the link |
| Google Sites embed | Yes, inside a Sites page | Specific people and groups, or the public |
| Apps Script web app | Yes, in a sandboxed frame | You, your domain, any signed-in Google user, or anyone |
| ashare.net | Yes, HTML, Markdown or a ZIP of a small site | Your company’s email domain, up to 100 emails, or anyone with the link, with an optional password and expiry |
“Anyone at your company” that shows the page
On ashare.net the file opens as a page, and you choose who gets in for each document.
- Sign in at ashare.net/me with your work email. If nobody on your domain has an organization yet, you get one named after the domain, with a 30-day trial and no card.
- Upload the .html file, or a ZIP with
index.htmlfor a page with its own CSS, scripts and images. An agent can publish it instead: connect it once and ask. - Under Access, pick Company. Everyone who signs in with an email on your domain opens it. Add people from outside by email, up to 100 per document.
- Send the link. Readers type their email and a 6-digit code from the letter, or sign in with Google. No account to create.
Anyone else sees “You don’t have access” and can ask you in; you approve from the email. For company documents you see who opened it and when. When you fix the report, upload a new version on the document page: the link, the access and the comments stay, and readers can compare the two versions. Readers can also select text and leave comments for you or your agent.
For a page that is public anyway, a link with a password works without any sign-in; see Password-protect an HTML page. And if the page must stay inside Google Workspace, Google Sites or Apps Script keeps it there.
ashare.net: your agent publishes HTML or Markdown and you choose who opens it: your company, specific emails or a password. Readers comment, the agent fixes the document.
Connect your agent