How to fix "session expired" errors
Somewhere between one page and the next, the server stopped recognising you as logged in — here is why that happens and how to stop it.
You log in, work for a while, and then a page suddenly acts as though you were never logged in at all — sometimes with an explicit "session expired" message, sometimes just a silent bounce back to a login screen. A session is how a server remembers that a particular set of requests all belong to the same logged-in visitor, usually via a small piece of data called a cookie. When that memory breaks, the server starts treating you as a stranger again, mid-task.
How a session actually works
When you log in, the server creates a session and gives your browser a cookie containing an identifier for it. Every request after that includes the cookie, and the server looks up the matching session to confirm who's asking. If the cookie goes missing, gets rejected, or the server's own record of that session has been cleared or has expired, the connection between the two breaks — and from that point, every request looks like a fresh, logged-out visitor.
The usual causes, in order
1. The session length is set shorter than your actual workflow
Some platforms default to a fairly short session length, particularly on the admin or account area of a site. If you're regularly logged out after a specific, consistent amount of time — always around twenty minutes, say — that's very likely a deliberate session timeout setting rather than a fault. Check your platform's session or security settings for a configurable session length and increase it if it's shorter than suits how you actually work.
2. A caching layer is serving a logged-out version of a page
Page caching, by design, stores one version of a page and serves it to everyone — which is exactly wrong for anything that needs to look different depending on who's logged in. If a caching plugin or a server-level cache is caching pages that should be dynamic, a logged-in visitor can be served a cached, logged-out version of the page, which looks identical to an actual session expiring even though nothing about your login has really failed. Confirm your caching setup excludes logged-in sessions, or the specific pages that depend on login state, from being cached. Our guide on caching a dynamic site correctly covers this distinction in more detail.
3. Cookies are being blocked or cleared
Browser privacy settings, an extension, or a setting that clears cookies automatically on tab close can all remove the session cookie mid-visit. Check whether your browser is set to block third-party or all cookies for the site, and whether any installed extension is specifically aimed at blocking tracking or cookies — these occasionally catch a legitimate session cookie as collateral, particularly if it isn't set with the exact attributes the extension expects from a "normal" site.
4. The server's session storage is being cleared too aggressively
Sessions are usually stored as small files on the server, or in a dedicated session storage system. If a cleanup process — a scheduled task, a low-disk-space cleanup script, or an overly aggressive cache-clearing tool — is removing these files before they're actually due to expire, sessions end early for everyone, not just you. This shows up as sessions expiring inconsistently, sometimes quickly and sometimes not, rather than at a fixed, predictable interval.
5. A mismatched system clock
Session expiry is calculated using time, and if the device you're using has a clock that's noticeably wrong, the browser or server can calculate that a session has already expired when it hasn't, or the reverse. This is uncommon but worth a quick check if the fault is confined to one specific device.
6. Multiple servers without shared session storage
On a setup that distributes traffic across more than one server, a session created on one server isn't automatically visible to another unless they're explicitly configured to share that information. A visitor can appear logged in on one request and logged out on the very next if it happens to be handled by a different server. This is a configuration question rather than something fixable from within a single page, and worth raising with support directly if you suspect it applies to your setup.
Narrowing it down
-
Note exactly how long you're logged in for before it happens
A consistent, repeatable duration points at a configured timeout. An inconsistent duration points at something being cleared unpredictably, such as storage cleanup or caching.
-
Test in a private or incognito window
This rules out browser extensions and existing cookie settings in one step. If the session holds up there, the cause is local to your normal browsing profile.
-
Ask whether it happens to other logged-in users too
If it's happening to everyone, it's a server-side or caching issue. If it's just you, it's local to your device or browser.
If you're still getting logged out unexpectedly
Send support the approximate time between login and the session expiring, whether it's consistent, and whether it affects other users too. That's usually enough to tell whether the cause is a caching configuration, a session length setting, or something worth investigating server-side.
Frequently asked questions
Why does this only happen on one browser or device?
This points strongly at something local — cookies blocked or being cleared automatically, a browser extension interfering, or the system clock on that specific device being wrong. If it happens for every visitor on every device, the cause is more likely server-side, such as session storage or a caching layer.
Related reading
Submitting the login form just bounces you back to it — usually a URL mismatch, cookie problem, or a plugin, worked through in order.
How to clear your browser cache properlySupport will often ask for this first, because a stale cached copy of a page is a surprisingly common cause of a fault that has already been fixed.
How to cache a site that changes constantlyHow to get the benefits of caching on a site that has logins, carts or content updating constantly.
How to fix "Error establishing a database connection"A blank page with one line of text, and five possible causes. Here is how to tell which one you have, in the order worth checking.