Document Hosting
Definition
Document hosting covers the file types people work in rather than read in a tab. A Word file, a spreadsheet or a deck reaches a browser and has nowhere to go: there is no built-in renderer for any of them, so the only sensible outcome is a saved file that opens in the application it was made for. That puts all the weight on two response headers and on the name the file arrives with. Each format has its own long MIME type — a .docx is application/vnd.openxmlformats-officedocument.wordprocessingml.document, an .xlsx ends in spreadsheetml.sheet — and getting one wrong is the usual reason a download opens as nonsense. This is the opposite situation from PDF hosting, where the whole point is that the browser can display the file.
Why It Matters
A download that arrives as 'download (3)' or, worse, as an unnamed .zip is a small disaster: the recipient cannot tell what it is, the association with Word is lost, and double-clicking it does nothing useful. Named correctly, the same bytes land as Q3-board-pack.docx and open on the first attempt. Filenames also survive into the recipient's own filing, so a vague one propagates through their team for months. The other thing worth deciding early is whether the reader needs to edit at all — if not, exporting to PDF removes every one of these problems, since the document then simply opens in the tab.
How It Works
The host sends the format's own Content-Type together with Content-Disposition: attachment and a filename parameter, which is what the browser writes to disk. Non-ASCII names need the filename*=UTF-8'' form alongside the plain one, or accented characters come through mangled. A detail that catches out home-made setups: the OOXML formats are themselves ZIP containers full of XML, so a server that sniffs content rather than trusting the file extension will label a .docx as application/zip and the download arrives as an archive. Range requests and caching work as they do for any other object, since nothing here is parsed or transformed — the web server hands over the stored bytes exactly as they were uploaded, which is also why formatting, fonts and macros survive the trip intact.
Real-World Example
A firm publishes its standard terms as a 900 KB .docx at northgate-terms.99helpers.site so clients can mark it up. 99helpers serves it with the Word media type and a Content-Disposition naming the file, so it saves as northgate-terms.docx and opens in Word with track changes ready. The firm hosts the signed version as a PDF beside it, because that one is meant to be read rather than edited, and nobody needs to download anything to look at it.
Common Mistakes
- ✕Letting a server guess the type of a .docx or .xlsx — it sees the ZIP container inside and labels it application/zip, so the download opens as an archive of XML
- ✕Publishing a document for people who only need to read it, when a PDF export would open in the browser and skip the download entirely
- ✕Shipping a file whose name means nothing outside your own folder structure, such as final-v4-NEW.docx, which the recipient then keeps forever
- ✕Forgetting that a shared document carries its history with it — tracked changes, comments and author names travel inside the file
Related Terms
MIME Type
A MIME type, also called a media type or content type, is the short label a server sends to say what kind of data a response contains — text/html, image/png, application/pdf. The browser decides what to do with the bytes based on that label, not on the file name.
Content-Disposition
Content-Disposition is an HTTP response header that tells the browser whether to show a file in the window or save it to disk, and what name to suggest when it saves. It is how one URL can either open a PDF in a tab or start a download.
File Extension
A file extension is the short suffix after the last dot in a file name — .pdf, .png, .html, .woff2 — used as a hint about what the file contains. It is part of the name, never part of the data.
PDF Hosting
Publishing a .pdf at a web address so it opens in the reader's browser rather than landing in their downloads folder. The header the host sends decides which of those happens.
Web Server
The software that listens for HTTP requests and answers them with files or generated responses. Nginx, Apache and Caddy are web servers; something like them sits behind every address you have ever opened.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →