On this page
- Key Takeaways
- What a signed URL does
- Why a signed URL stops working
- Its configured expiry time has passed
- The signing credentials or permissions changed
- The URL or request no longer matches what was signed
- The object is missing or the request is unauthorized
- There is a time or date configuration problem
- Diagnose the failure systematically
- Provider-specific checks
- Share signed URLs safely
- Common Mistakes
- Best Practices
- Conclusion
- References
A signed download URL lets someone access a specific cloud-storage object without giving them your account credentials. It is also temporary: the link may stop working at its expiry time—or earlier if its credentials or permissions change. This guide explains why signed URLs expire and how to distinguish an expired link from a missing object, a clock problem, or an authorization failure.
Key Takeaways
- A signed URL’s lifetime is set by its signing method and provider; there is no universal expiry format or maximum duration.
- Temporary signing credentials, permission changes, and provider policies can make a link fail before its requested expiry time.
- Check the provider’s error response, the object’s current existence, and the URL’s expiry settings before generating a replacement.
- Treat the entire signed URL as a secret: query parameters may contain the signature and other authorization details.
What a signed URL does
A storage provider verifies a signature in the URL before allowing the requested operation, such as downloading an object. The signature is usually tied to details such as the object path, HTTP method, signing identity, and expiration. Altering a signed part of the URL can invalidate it.
A signed URL is a bearer link: anyone who obtains a usable copy may be able to perform the operation it permits until it expires or becomes invalid. It does not make the object public in the usual sense, but sharing the link shares its access.
Providers express expiration differently. For example, an AWS S3 presigned URL commonly uses X-Amz-Expires, a Google Cloud Storage V4 signed URL uses X-Goog-Expires, and an Azure SAS URL uses fields such as se for its expiry time. These names and rules are provider-specific; they are not interchangeable formats.
Advertisement
Why a signed URL stops working
Its configured expiry time has passed
The URL may have been created with a shorter lifetime than expected, or it may have been copied and used after that lifetime elapsed. Check the code, SDK configuration, or service that generated it—not just the time someone received the link.
Provider limits also differ. AWS documents a maximum of seven days for SigV4 presigned URLs created with SDKs or the CLI, while URLs signed with temporary credentials can stop working when those credentials expire sooner. Google Cloud Storage V4 signed URLs have a maximum expiration of seven days. Azure SAS lifetime behavior depends on the SAS type and applicable storage-account policies; do not assume the AWS or Google limit applies to Azure.
The signing credentials or permissions changed
A URL can stop working before its stated expiry if its signing credentials expire, are revoked, or are otherwise no longer accepted. A policy change, access revocation, key rotation, or a change in the signer’s access can also affect whether the request is authorized. A long URL lifetime is not a guarantee that access will remain available for that entire period.
The URL or request no longer matches what was signed
Changing the object path, HTTP method, or signed query parameters can invalidate a signature. Some clients, proxies, and applications also mishandle characters when copying or encoding a URL. Copy the complete link without editing it, and avoid rebuilding it from decoded pieces.
The object is missing or the request is unauthorized
A failed download does not always mean the URL expired. The object may have been deleted or moved, the link may point to the wrong path, or the signing identity may not have permission for the requested operation. Providers may return different status codes or messages for these cases, and some configurations intentionally avoid revealing whether a resource exists.
There is a time or date configuration problem
The expiry is evaluated by the storage provider, not by the time shown on the recipient’s device. A recipient’s incorrect clock alone usually does not change the expiry of an already-created link. However, clock skew on the system creating a signed request, an incorrect timezone conversion, or a start-time setting that falls in the future can cause authentication failures. Check UTC timestamps and the signing host’s clock when the error indicates a date or signature problem.
Diagnose the failure systematically
- Capture the exact response. Record the HTTP status, provider error code, and response body. Do not paste the complete signed URL into a public ticket or chat; redact its query string.
- Check the generated expiry. Inspect the signing code or configuration and calculate the intended expiry in UTC. Confirm that the link was created for the expected duration and that the client did not truncate it.
- Check the provider’s signing limits and credentials. Compare the requested duration with the provider’s documented limits. Verify that temporary credentials, signing keys, or policies have not expired or been revoked.
- Check the object independently. Using an authorized account or the storage provider’s console, confirm that the exact object still exists at the expected path. Do not use the failed signed link as the only test of whether the object exists.
- Check the request. Confirm the HTTP method, object path, and any required headers match the signed request. If a start time is configured, check it against the provider’s current time and timezone handling.
- Generate a fresh, narrowly scoped link for a controlled test. If it works, compare its expiry, signing identity, and request details with the failing URL. A new link is a diagnostic step, not proof that the underlying access policy is correct.
Error messages are clues, not a universal decision table. For example, an expiry-specific error points toward lifetime or credential timing, while a signature-mismatch error can indicate a changed URL or request, incorrect signing configuration, or clock trouble. A not-found response may indicate a missing object, but authorization behavior can vary. Use the provider’s response details and logs to narrow the cause.
Provider-specific checks
| Provider | What to inspect | Important qualification |
|---|---|---|
| Amazon S3 | X-Amz-Expires, the signing method, and the credentials used to sign | SigV4 presigned URLs created with SDKs or the CLI can be valid for up to seven days, but temporary credentials can expire sooner. |
| Google Cloud Storage | X-Goog-Expires, the signature version, and the signing identity | V4 signed URLs have a maximum expiration of seven days. |
| Azure Storage | SAS fields such as se, the SAS type, and any storage-account expiration policy | SAS behavior and constraints depend on the type of SAS and account configuration; there is no single AWS-style duration rule to apply to every SAS. |
Advertisement
Share signed URLs safely
- Grant only the required operation, such as read access for a download, and limit access to the intended object.
- Choose an expiry that matches the sharing need. Shorter lifetimes reduce the period in which a leaked link may be usable, but make links less convenient and require a way to issue replacements.
- Use HTTPS and share links only through channels appropriate for their sensitivity.
- Avoid putting complete signed URLs in public pages, issue trackers, analytics events, screenshots, or application logs. Query strings can be recorded by systems beyond your application.
- Redact query parameters when debugging. If a usable URL has been exposed, treat it as compromised; revoke or invalidate access if the provider and signing setup allow it, or wait for it to expire and issue a replacement.
- For links that need to be long-lived or individually revocable, consider an authenticated download flow or a service that issues fresh, short-lived links after authorization.
Common Mistakes
- Assuming every provider uses the same expiry field or maximum duration. Check the documentation for the exact storage service and signing method.
- Treating every 403 response as an expired URL. Permission failures, invalid signatures, expired credentials, and policy restrictions can look similar.
- Checking only the visible expiry parameter. The signing credentials or an access policy may stop authorizing requests earlier.
- Blaming the recipient’s clock automatically. Focus on the signer’s clock, configured start time, and UTC conversion unless the provider’s response indicates otherwise.
- Sharing a signed URL as though it were harmless. A complete link can grant access to anyone who gets it.
- Editing or partially copying the URL. Query-string changes, truncation, or encoding changes may break the signature.
Best Practices
Keep the signing operation close to the authorization decision, use the narrowest practical scope and lifetime, and make the expiry visible to the person sharing the link. Log diagnostic information such as the object identifier, signing time, requested lifetime, and provider error code—but exclude the full signature and other secret URL parameters. When a link fails, compare its configuration and provider response with a newly generated link rather than extending its lifetime blindly.
Conclusion
A signed download URL can fail because its expiry passed, its credentials or permissions changed, the object is missing, or the signed request no longer matches. Check the provider-specific rules and error details, verify the object separately, and handle the full URL like a secret.
References
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.