Panel throws 401 and 404 errors

I run a Kirby site on a US GoDaddy server. I can log in the panel, but as soon as I edit a panel fields (like entering a letter or deleting one), I am redirected to an error page (json):

{“status”:“error”,“message”:“Unauthenticated”,“code”:401,“exception”:“Kirby\Exception\AuthException”,“key”:“error.auth”,“file”:“/kirby/config/api/authentication.php”,“line”:14,“details”:,“route”:“(.*)/lock”}

A similar thing happens when I click the “system” tab, with a 404 error.

The error messages appear as soon as I type something in a field, not after saving changes.

Strangely enough, my customer in the US can edit the panel without errors being thrown. But on his side, it takes several hours until changes show up in the front end.

Can somebody please hint me to a solution? I read all the kirby articles and threads I could find related to this issue but no suggested solution worked, like setting a fixed url in .htaccess, deleting browser and kirby cache.

Thanks a lot in advance!

PS: I just found out that this error appears in firefox (latest version), not in chrome.

Hey there!

It’s definitely not expected that your customer’s changes take hours to appear on the frontend. I would suspect that there could be a caching layer on GoDaddy’s end. Maybe you could look into that. This might also be caching Panel API responses, and then you could get a cached 401/404 even though you’re logged in.

I would check for:

  • Hosting cache or CDN in your GoDaddy dashboard or cPanel or whatever they offer. Turn it off and see if this might fix already your problems.
  • Firefox console: look for the failing .../lock request in the Networking tab. Does it send the kirby_sessioncookie? Do the response headers show signs of caching (age, x-cache, cf-cache-status)?
  • Also try with a private browser window and all extensions disabled to rule out problems there.
  • Which Kirby 4 version are you using?

Hey, thanks for your answer and your suggestions!

The backend to frontend delay could meanwhile be solved by simply using a different browser. I guess it was a caching issue on the client side.

What remains are 401 and 404 errors when editing the panel in Firefox. Everything works fine in Chrome. I will go through your list and see if one of those solutions will work. I will get back to you.

Thanks again!

I am using kirby 4.5

After chatting with Godaddy AI support agent for one hour, I finally found the solution: Whitelisting my public IP in the GoDaddy firewall settings under “access control” did the trick. Now the panel works normally in every browser. Thank you for your helpful checklist!