How to share an HTML file as a link.
Send someone the .html file itself and they usually get a download, a screen of raw code, or a page with the styling missing. A link avoids all three. Here is why the file travels badly, and how to turn it into a URL that opens on any device.
Updated August 2026
Share my HTML file →01 Why sending the file itself goes wrong
An HTML file is only a web page while something is serving it as one. Detached from a server it is just a text file, and everything downstream treats it that way.
- Mail systems distrust it. An HTML attachment is a common phishing wrapper, so plenty of corporate mail gateways quarantine or strip one before the recipient ever sees it.
- Chat apps hand over a file, not a page. Slack, Teams and WhatsApp all offer a download.
- The assets stay behind. If your
index.htmlsits next to acssfolder or animagesfolder, sending one file sends one file, and the page arrives unstyled. - A file path is not a link.
file:///Users/you/site/index.htmlresolves on your machine and nowhere else. - Even a clean download can misbehave. Opened from disk, the page runs on the
file://protocol, wherefetch()calls, module scripts and anything that expects a real origin quietly fail.
02 Share it as a link in 3 steps
Drop the file in
From yapp.page, drag your .html into the drop area. If the page needs images, CSS or scripts, drop the whole folder or a ZIP that contains index.html.
Copy the link
The page is live at its own address about two seconds later, something like yourname.yapp.page. A QR code comes with it if you need one for a phone or a slide.
Send the link anywhere
Email, chat, a document, a slide deck. It opens as a rendered page with a clean preview, and nobody has to download or unzip anything.
03 Sharing a local file that has CSS, images or JavaScript
This is where most attempts break, and the symptom is always the same: the page loads, but it looks like plain text with blue links.
A line like <link rel="stylesheet" href="css/style.css"> is a relative path. It points at a file sitting next to the HTML, so the stylesheet has to travel with the page. Upload the folder, or zip the folder and upload that, and the paths keep working exactly as written. If your file references something on your desktop by absolute path, fix that first, because it will never resolve for anyone else.
Not sure whether the file renders the way you expect? Paste it into the free HTML and CSS viewer and look at it before you send the link to anyone.
04 What each method actually gives the other person
| How you send it | What they get |
|---|---|
.html as an email attachment | A download, if the mail filter passes it at all. Assets missing. |
| Google Drive | A preview or a download. Drive stopped serving HTML as pages in 2016. Details |
| SharePoint or OneDrive | A download, or the file opened in a code view. Details |
| Slack or Teams | A file to download and open from disk. Details |
| A ZIP of the folder | Correct assets, but they have to unzip it and open it locally. |
| A hosted link | The rendered page, in the browser, on any device. |
05 When the link should not stay up forever
A client preview, a draft, a one-off demo. Plenty of shared pages are supposed to disappear.
- Publishing without an account gives you a link that lasts 30 minutes. That is long enough to confirm the page renders, and short enough that you have nothing to clean up afterwards.
- A free account holds one page for 30 days, and you can extend it before it goes.
- Paid plans keep pages until you delete them, and add a password on the page for anything that should not be readable by whoever finds the URL.
An expired link stops resolving for real. We do not keep serving an old copy after the page is gone. See plans →
06 Frequently asked questions
How do I share an HTML file?
Put it somewhere that gives it a web address, then send the address rather than the file. Drag the .html onto yapp.page and you have a live URL in about two seconds.
Can you share HTML files?
You can send the file, but the person on the other end usually gets a download instead of a page, and anything that lived in the same folder does not come along. Sharing it as a link avoids both.
How do I share a local HTML file?
A file:/// path only works on your own computer, so upload the file to get a real URL. If it uses a css or images folder, upload the folder or a ZIP with index.html inside so the relative paths still resolve.
How do I share an HTML website with more than one page?
Same route. Drop the folder or a ZIP containing index.html, and the links between your pages keep working. Publishing a multi-page site →
Why does my HTML file open as code instead of a page?
Whatever is serving the file is sending it as a download or as plain text rather than telling the browser to render it. Google Drive, SharePoint and most chat apps all behave this way with .html.
Can I share an HTML file without hosting it?
Only by sending the file and asking the other person to download and open it, which is where the missing styling and the mail filters come back. If it has to open in someone else's browser, it needs an address.
How do I share an HTML document by email?
Paste the link into the email instead of attaching the file. The link previews properly in most mail clients, and it will not be stripped by a filter the way an .html attachment can be.
Related
Host an HTML file online, free →
How to publish an HTML website →
HTML and CSS viewer: check it before you send it →
Sharing HTML through SharePoint →
Sharing HTML through Google Drive →
Share a PDF as a link →
Let ChatGPT or Claude publish it for you →