So I doubt I was the only one who got hit by this issue. Basically everything was fine in cPanel land until one day I was randomly getting logged out of cPanel (sometimes immediately after I’d logged in, other times after a few minutes). When I did manage to log in the cPanel interface appeared broken with missing images and occasionally missing stylesheets. In some cases I’d be blocked from even loading the login page. It wasn’t an isolated incident either as this problem cropped up on different hosting services.
Understandably frustrating when you rely on cPanel to configure your hosting.
Thankfully all the webhosts I use were most helpful and were able to resolve the issue quickly. Unfortunately it would keep coming back.
I finally stumbled upon the issue: Cloudflare + cPanel = 🙁
Cloudflare added a page to their Troubleshooting Knowledge Base which addresses this very issue: My cPanel won’t load or keeps logging me out after enabling Cloudflare. According to Cloudflare, the issue is due to cPanel’s Cookie IP Validation which makes sure each request comes from the same IP address. And since Cloudflare may use different IP addresses between requests, the test obviously fails.
The suggested solution, which seems to work for me, is to create a cpanel subdomain for the domain in question (e.g. http://cpanel.caveenasolutions.com) and make sure it isn’t proxied through Cloudflare.