What is a signed URL?
Definition
A signed URL is a temporary address for a stored file with a cryptographic signature and an expiry time built in. It lets a browser fetch one specific file for a few minutes, so the storage itself never needs to be public.
Also called: Presigned URL, Pre-signed link, Signed link, Temporary URL
How does a signed URL work?
A signed URL works by carrying its own permission. The host's server takes the file's path, an expiry time and the allowed action, such as download or upload, and runs them through a secret key that only it knows. The result is a signature, a long string of characters added to the end of the address.
When a browser uses the URL, the storage service repeats the calculation with the same key. If anything in the address was changed, or the expiry time has passed, the two signatures do not match and the request is refused. No login is needed, because the URL itself is the proof that the host said yes.
Why do file hosts use signed URLs?
File hosts use signed URLs so their storage can stay private while people still get their files quickly. Without them, a host has two poor choices: make every file public on the storage service, or pass every byte through its own web servers. Signed URLs avoid both:
- Uploads go straight from your browser to storage, so big files skip the size limits of the website's own servers.
- Downloads are handed out only after the host has checked the link's password, expiry date or view limit.
- Each URL covers one file and one action, so a leaked address cannot be used to list or change anything else.
Is a signed URL the same as a shareable link?
No. A shareable link is the stable address you send to people, and it can stay the same for years. A signed URL is a short-lived address the host creates behind the scenes, often a fresh one each time someone opens the shareable link and passes its checks.
That split is what makes link controls hold. Turn a shareable link off and no new signed URLs are made for it, while the ones already handed out run out within minutes. It is also why you should not copy a signed URL from your browser and send it on: it will soon stop working, and it skips the page your reader was meant to see.
Can anyone use a signed URL?
Yes, anyone who holds it can use it until it expires. A signed URL works like a ticket: there is no password or account check, so whoever has the address gets the file. That is why hosts keep the expiry short. One with a long expiry behaves like an expiring link that usually cannot be cancelled early, which makes it a poor way to share a file.
| Address | Who can open it | How long it works |
|---|---|---|
| Public storage URL | Anyone who finds it | Until the file is deleted |
| Signed URL | Anyone holding it, for one file | Until its expiry time, often minutes |
| Shareable link | Anyone with it, after the link's checks | Until you turn it off or it expires |
Signed URL: common questions
What does a signed URL look like?
Like a normal web address with a long query string on the end. On S3-compatible storage, for example, you see parameters such as X-Amz-Expires and X-Amz-Signature.
How long does a signed URL last?
As long as the host decides, from seconds to days. Hosts that care about access control keep it to minutes, because anyone holding the URL can use it until then.
Can a signed URL be revoked?
Usually not one at a time. It stays valid until it expires, unless the host changes the secret key, which cancels every URL signed with it.
Why did a download address stop working after a few minutes?
You probably copied the signed URL the host used behind the scenes, not the link you were sent. Open the original link again and the host gives you a fresh one.
Related terms
- Shareable linkA shareable link is a web address that opens a file for anyone who has it, without the file traveling as an email attachment. You send a few characters instead of the bytes, and you can usually change or turn off the link later.
- Expiring linkAn expiring link is a link that stops working at a date and time you choose. Anyone who opens it after that sees a dead page, but a copy someone already downloaded stays on their device.
- Direct download linkA 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.
- CDNA CDN (content delivery network) is a set of servers around the world that keep copies of popular files close to the people opening them. The result is faster loading and less strain on the original server.
- HotlinkingHotlinking is showing another site's image, video or file on your own page by linking straight to its file address. The file loads from the other site's server, so that site pays for the bandwidth and usually never agreed to it.
- API keyAn API key is a secret string that lets a script or app act on your account without your password. Treat it like a password: keep it out of public code, and delete it when you no longer need it.
Go deeper
Updated