In the general config settings, one can set a logoutPath, and one can use it using the logoutUrl Global.

However, it says also in the docs: Note that Craft will automatically redirect users to your homepage after going here; there’s no such thing as a “logout page”.

In short; is there any other way to log a user out, besides "triggering" a visit to the predefined logoutPath, which logs users out, but immediately redirects them to the homepage; as it would be more elegant and userfriendly to show some kind of "you've been logged out" message instead first.


Might be going overboard, but you could have a plugin with it's own controller that provided different logout behavior.

But it sounds like to me what you're looking for is something like a 'logoutRedirect' config setting. Probably worth adding to the feedback site!

| improve this answer | |
  • 2
    Thanks! Right, but the confusion comes from -- please correct me if I'm wrong -- that loginUrl actually goes to the specified login page, and stays there, if the user isn't logged in. While logoutUrl logs out, but just goes to the homepage. One would expect these 2 similar variables to act more identical. At least, to me. But it's no biggie. I'll post it on the feedback site, but don't expect much animo for this niche thing. Maybe it's just me. – tom May 29 '15 at 23:20
  • As of today, I can't find the note about being redirected to the homepage afterwards. Is that still the case? This seems really odd... there's no way after a user logs out to provide some kind of feedback to them? Just a redirect to the homepage? – Mike May 23 '17 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.