client-previews
How to expire a website preview link automatically
By PreviewSend Team · Jul 25, 2026 · 6 min read

To expire a preview link automatically, set an expiry date on the hosted project. After that moment every request to the link returns HTTP 410 Gone instead of the site, so an old link left in an email thread stops opening on its own. Expiry ends access on a schedule; it does not delete your files, and you can reopen the link deliberately later.
That closes the gap between "the review is over" and "the link still works." A client, or anyone they forwarded the email to, can reopen a shared preview weeks after sign-off unless something takes it offline. An expiry date is what closes it on the schedule you set.
What automatic expiry actually does
Automatic expiry attaches a date to the link and changes the server's answer once that date passes. Before the deadline the link serves the site. After it, the same URL returns a status code that says the resource is gone, so the browser shows an "unavailable" page rather than the preview.
The status code matters. HTTP 410 Gone tells browsers and crawlers the resource is intentionally unavailable and the condition is likely permanent, and a 410 is cacheable by default. A plain 404 only says "not found" and leaves open whether the absence is temporary. For a preview that is deliberately over, 410 is the honest answer.
Expiry is easy to confuse with two other controls:
- A
noindexdirective asks a search engine not to list a page that still loads. It is a rule delivered in a meta tag or response header that a supporting crawler has to reach the page to see. Expiry, by contrast, stops the page from loading at all. - A password decides who may open a live preview. Expiry decides whether there is a live preview to open. If the content must stay private during the review, that is still a password's job; protecting a static preview with a server-side password covers why a check inside the page's own JavaScript cannot do it.
Access, indexing, and expiry are three separate controls. A link can be live and password-gated, live and public, or expired regardless of either.
Expire a website preview link automatically in PreviewSend
On PreviewSend, expiry is an optional setting on every plan. Set it in Project Settings:
- Open the project in Project Settings and find the Expiry date field.
- Enter the date the review closes and choose Save expiry.
- Share the link as usual. It serves the current active version until the deadline.
The cutoff is 00:00:00 UTC, not the end of your local day. The field stores a YYYY-MM-DD date and converts it to that instant, so the link stops serving as the chosen date begins in UTC. Check what midnight UTC means in your timezone and move the date later if the preview needs to stay open through a local business day.
Once the deadline passes, every request to the hosted link returns 410 with a short "Preview link expired" message. Expiry is checked before both the active-version lookup and the password gate, so an expired link does not show the password prompt first, and the account-free comment and review endpoints return 410 in the same way. A reviewer who opens a forwarded link after the deadline sees that it is gone, not a login they might try to get past.
To clear a deadline you no longer want, empty the Expiry date field and save; that removes expiry entirely.
Verify the deadline before you rely on it
An expiry you never tested is a guess. Confirm the behavior the way a reviewer will experience it, not just that a date is saved.
| Check | How to test it | Expected result |
|---|---|---|
| The deadline is set | Reopen Project Settings | The intended date shows in the Expiry date field |
| The link is live now | Open the URL in a fresh private window, signed out | The current version loads normally |
| Expiry actually fires | Temporarily set the date to one already passed, then reload | 410 with "Preview link expired", and no password prompt |
| Your files are untouched | Look at the project's version history | The build is still listed within plan retention |
Test the third row once. Set the expiry to a past date, confirm the link returns 410, then set it back to the real deadline. If you have a terminal handy, curl -s -o /dev/null -w '%{http_code}\n' URL prints 410 without a browser cache muddying the result. Testing the live response, not just the saved value, tells you the takedown works.
What expiry does not do
Expiry changes whether the current link opens. It does not manage the files or erase the link from every other system.
- It does not delete your work. The project and the uploaded build remain; the link is simply offline. Builds are still bounded by your plan's version-retention limits, so keep a copy of whatever you shipped regardless.
- It is not a rollback feature. Retained versions are a history, not a one-click reactivate of an old build. Clearing or extending expiry reopens the current active version, not a specific earlier one.
- It does not scrub search results on its own. Google removes already-indexed 4xx URLs over time, not the instant the status changes, and it treats all 4xx except 429 the same for this purpose. Every normal hosted response also carries an
X-Robots-Tag: noindex, nofollowheader, but that asks search engines not to list the preview; it is not a guarantee of removal. If a draft was public and indexed, expect the listing to age out rather than vanish. - It is not a substitute for a password. While the preview is live, an unlisted or
noindexURL is not private. The reasons a hidden URL is not access control are the same ones behind a staging site showing up on Google: links get forwarded and pasted, and only an access check stops the wrong person from opening a live page.
Reopen or extend an expired preview
Reviews reopen. A client comes back a month later, or the deadline moves before the work is done. Both are handled from the same expiry field:
- To extend before it expires: set a later date and save. The link keeps serving without interruption.
- To reopen after it expired: clear the date, or set a future one. The server starts serving the current active version at the same URL again. Because a 410 can be cached, someone who checked the link while it was expired may need to reload or open a private window.
Because the address never changes, reopening does not mint a new link or ask anyone to move. What comes back is the version that was active when the link went offline. If you need a different build live instead, re-upload that saved version as a new one; there is no one-click swap to an older build. Where expiry sits in the wider arc of a short-lived preview, from upload to teardown, is covered in temporary website hosting for client work.
Set the deadline before you send the link, then include the UTC cutoff in your review message so nobody has to guess when it closes. If you need a hosted preview that can expire on schedule, create a PreviewSend project and set the date in Project Settings.
FAQ
Does expiring a preview delete my uploaded files?
No. Expiry ends access to the link; it does not remove the project or the build. On PreviewSend the upload stays in version history within your plan retention while the link is offline. Clearing or extending the expiry date serves that build again at the same URL.
Does a 410 response remove the URL from Google?
Not instantly. Google treats 4xx responses, including 410, as a signal that the page is gone, and it removes already-indexed 4xx URLs over time rather than the moment the status changes. Expiry controls whether the link opens; it is not a fast deindexing tool, and it is separate from a noindex rule.
Is a noindex directive the same as expiry?
No. A noindex rule asks search engines not to list a page that is still reachable. Expiry stops the page from serving at all. One is about search listings, the other about access, and neither is a password for a live preview.
Can an expired preview be reopened?
Yes. Clear the expiry date, or set a later one, and the current active version serves again at the same link. There is no one-click restore of an older build; if you need different files back, re-upload that saved build as a new version.
Does the password still matter after a link expires?
The password guards access only while the preview is live. On PreviewSend expiry is checked before the password, so an expired link returns 410 without ever showing the password prompt. Keep the password for the review window and let expiry close the window.
Have a site to host? Upload it and get a live link in seconds.
Get it free