Link types and controls

What is a direct download link?

Definition

A direct download link is a link that starts the download straight away instead of showing a preview page first. It suits installers, datasets and scripts that fetch a file, and is less useful when you want the reader to look before they save.

Also called: Direct link, Download link, Direct file link

How does a direct download link work?

A direct download link works because of one instruction the server sends with the file. The link itself is an ordinary address, and the server answers it with a header called Content-Disposition. The value "attachment" tells the browser to save the file. The value "inline" tells it to show the file in the tab.

So the same address can download or display, depending on what the server says. You cannot tell from the link alone. A second label, the MIME type, tells the browser what kind of file it is, which decides how an inline file is shown.

When should you use a direct download link?

Use a direct download link when the person needs the file to do something else with it, not to read it:

  • Installers, plugins and app builds.
  • Datasets, CSV exports and backups.
  • Files fetched by a script or a command such as curl.
  • Assets someone will open in another program, such as fonts or design files.

When is a preview page better?

A preview page is better when the file is meant to be read. A proposal, a menu, a resume or a deck is quicker to read in the browser than as a file in a Downloads folder. On a phone, a surprise download often lands in a files app with no context, and on a slow or metered connection it spends someone's data without asking.

A page with a preview and a download button covers both readers: the one who wants to look and the one who wants a copy. If you would rather nobody kept a copy, a view-only link hides the download entirely.

Why do some direct download links stop working?

Some direct download links stop working because they rely on a trick, not a feature. Ways to turn a cloud drive's share page into a raw download address are often undocumented, so they can break when the service changes its addresses. Large files may also stop at a warning page first.

Hosts that keep files in private storage often hand out a short-lived signed URL at the moment of download. Copying that address and posting it elsewhere fails once it expires, which also limits hotlinking.

Direct download link vs preview page
What differsPreview pageDirect download link
What opensA page that shows the fileNothing, the download starts
Good forFiles meant to be readInstallers, datasets, scripts
On a phoneOpens and is readableLands in a files app
What you can countEvery visitOnly the downloads

Direct download link: common questions

What is the difference between a direct link and a share link?

A share link opens a page that shows the file, usually with a download button. A direct link points at the file itself and starts the download at once.

Can you track a direct download link?

Only the download itself can be counted, because no page loads first. A preview page can also show how long someone looked at the file.

Is a direct download link safe to click?

It is as safe as the file and the site behind it. Because the file arrives without a preview, only open downloads from people and sites you trust, and take extra care with programs and archives.

Do direct download links expire?

Some do. A signed link from private storage is built to expire within minutes, while a link to a public file lasts as long as the file stays where it is.

Go deeper

Updated

Share a file as a link in seconds

Upload any file and get one clean link, with every setting on this page.

Try Link in Seconds

Optional cookies for analytics, ads and session replay.