Session timeout

Since i moved my dns to cloidflare my users say they login session time outs too fast and they require to re log in to the site every few minutes.

Any solution?

I’ll assume your using WordPress unless you say otherwise.

For WordPress the sessions are handled by the cookie token and would not be affected by the Cloudflare proxy in most situations.

You however might be having an issue with Cloudflare as opposed to before because your WordPress might have a setting turned on which checks the sessions IP and invalidates their session if their IP changes. Since Cloudflare sits between your users and the origin website, the IP your website is seeing would be one of Cloudflare’s which is subject to change on every request :orange: proxied.

Above is just my rough guess what might be happening. Could you share more information about what CMS your website is using, what plugins you have installed, and what your Cloudflare configuration is.

You are most likely not rewriting IP addresses -

Once you do so, there shouldn’t be timeouts any more.


We have custom php laravel system.
I currently set the dns to dns only and not proxy
Should it fix it?

You should reconfigure your webserver according to the link.

Ok good, so you won’t need to diagnose a bad WordPress plugin to find the issue. Just follow the link @sandro sent so that you can update the code to restore the IP which is whats likely invalidating your users sessions.

I asked my server to install mod_remoteip
They did.
Should i do anything else? My developer has to het involved? Or i should consider it done?

Once the right IP addresses show up in the logs you should be set.

Ok thanks for the help

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.