Download Link
Definition
A download link is a URL that ends with a file arriving in somebody's Downloads folder. Whether that happens is decided by the response, not by the extension: one PDF served with a particular header opens in the browser's built-in reader, and the identical PDF served with a different header is written straight to disk. The header in question is Content-Disposition, and the saving behaviour is its attachment value. Browsers also honour a download attribute on an anchor tag, though only when the URL sits on the same origin as the page containing it. A download link and a direct link are frequently the same address wearing a different header — what changes is the instruction attached, never the bytes.
Why It Matters
Getting this wrong wastes people's time in both directions. A 40 MB video that opens inline starts streaming in a tab when the visitor wanted it on their laptop for a train journey; a contract that saves silently sends them hunting through a folder when a preview would have answered their question in three seconds. There is a naming consequence as well, because Content-Disposition can dictate the name the file is saved under. The difference between export_final_2.pdf and Acme-Invoice-2026-03.pdf on a client's desktop is one header. For anything meant to be kept — a ZIP archive, an installer, a dataset — forcing the save is nearly always right.
How It Works
The server answers with a 200 and adds Content-Disposition: attachment alongside the usual Content-Type, optionally with a filename parameter naming what to save it as. The browser reads attachment, skips its internal viewer, and writes the body to disk. Without that header it falls back to whatever it can do with the MIME type: render HTML, display a PNG, open a PDF in the reader, and save anything it does not recognise. On the client side, an anchor carrying a download attribute produces the same result for same-origin URLs and is quietly ignored across origins, which is why a cross-domain download button needs the server header to behave. Hosts that offer both an inline address and a download address for one file are simply serving the same object twice with different headers.
Real-World Example
An accountant hosts a 2 MB spreadsheet template on 99helpers at vat-template.99helpers.site. Served inline, it opened in a browser preview, and several clients rang to ask how they were supposed to edit it. Switched to save on click, with a filename of VAT-Return-Template-2026.xlsx, it now lands in their Downloads folder under a name they can still find a week later. The calls stopped.
Common Mistakes
- ✕Relying on the download attribute for a file on another domain — browsers ignore it across origins and open the file instead of saving it
- ✕Forcing a save on something people only wanted to glance at — a one-page menu or a single photo is far more useful rendered in the tab
- ✕Leaving the saved name as your internal one — the client ends up with export_final_2.pdf on the desktop and no memory of what it was
Related Terms
Direct Link
A direct link points at a file's bytes rather than at a page about the file. Request it and you get the file itself, with its own Content-Type header and nothing wrapped around it.
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.
Shareable Link
A shareable link is the address you hand to another person so they can reach a file you have hosted. It normally points at a page that presents the file — name, size, a download button — rather than at the raw bytes.
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.
HTTP Status Code
An HTTP status code is the three-digit number a server returns at the head of every response, saying what happened to the request. It is the first thing on the first line — a 200 means here is the file, a 404 means there is nothing at that address.
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 →