Skip to the content

419 Page Expired

Laravel's own code for a form that was sent with a missing or expired CSRF token. It is not part of the HTTP standard.

Class
Unofficial codes. Not in the IANA registry. These are made up by one piece of software and mean nothing outside it, but they turn up in logs and on error pages often enough.
Used by
Laravel

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What causes it

Laravel puts a hidden token in every form and compares it, when the form comes in, with the one in the session of the visitor. If the session has expired because the page was open too long, or the token is missing, the framework answers 419 and shows "Page Expired".

What to do about it

As a visitor: go back, reload the page and send the form again.

As the developer: make sure every form has the @csrf field and that requests from JavaScript send the token in an X-CSRF-TOKEN header. If it happens to everyone, the session is not being kept. Check the domain and the Secure setting of the session cookie, and that the page is not served from a cache with a token that belongs to someone else.

Not to be confused with

401 UnauthorizedThe standard code for a request without valid credentials.
403 ForbiddenWhat Django, for one, answers when the same check fails.

All codes are on the list of HTTP status codes, which can be searched by number and by word.

See all 12