# Error: This preview token has expired

**URL:** <https://community.prismic.io/t/error-this-preview-token-has-expired/507>\
**Category:** Developing with Prismic\
**Tags:** ruby\
**Created:** [May 22, 2020, 9:25am UTC](https://community.prismic.io/t/error-this-preview-token-has-expired/507 "2020-05-22T09:25:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [May 25, 2020, 9:59am UTC](https://community.prismic.io/t/error-this-preview-token-has-expired/507/2 "2020-05-25T09:59:31Z")

</div>

Hi Mathieu,

The preview token expires once the saved information has been archived or published. The preview token generated is only valid for the information being previewed at that time. So if the user is viewing an old link after the content has changed then they will see this error.

Also the error can occur when the website user forgets to click the 'X' button on the preview module to exit the preview. If they forget to do this the cookies might not be cleared and so their web browser can receive old preview data.

 ![Screenshot 2020-05-25 at 11.55.06](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/1X/b1d42789f94200a5e57aa6e8f5f79a1b866557df.png)

You can read how to troubleshoot previews here:

> [@Troubleshooting: Content Previews](https://community.prismic.io/t/troubleshooting-previews/5449):
>
> This article is designed to help you troubleshoot Prismic Previews. NextJS If you're using Next.js make sure you have covered all the following setup steps. Install @prismicio/next to handle previews Add the [PrismicPreview](https://prismic.io/docs/setup-nextjs#add-prismicpreview) component to the root of your app [Configure the preview routes](https://prismic.io/docs/setup-nextjs#add-preview-routes)[Ensure your Prismic repository has the correct preview route](https://prismic.io/docs/setup-nextjs#configure-previews-in-your-prismic-repository)Other frameworks Have you added the Prismic preview toolbar script to your site? Check in the \<head\> or \<body\> of your pages to make sure the script …

Thanks.

---

_[View the full topic](https://community.prismic.io/t/error-this-preview-token-has-expired/507)._
