Webflow sync, pageviews & more.
NEW

How can I create a "log-out" button in Webflow for a members-only page? I want to be able to redirect the logged-in users from the "Home" page to the "Log-in" page when they choose to log out. Additionally, I'd like to allow clients to view the log-in page and enable users to log out from any computer. See the provided read-only link for more details.

TL;DR
  • Add the Log Out element to your page, set its redirect to the Log-in page in Element Settings.
  • Ensure the Log-in page is public, configure access rules for members-only pages, and use visibility conditions to show the button only to logged-in users.

To add a log-out button in Webflow for a Members-only site, you’ll need to use Webflow’s Memberships and Logic features (currently in Beta or limited release). Here’s how to implement the log-out flow and ensure users are redirected to the correct page.

1. Use the Webflow Membership Log-Out Element

  • Drag a Log Out element from the Add Panel (press A and search for "Log Out" under the Membership section).
  • Place it where you'd like users to see the log-out button (e.g., the navbar or footer of a members-only page).
  • This button automatically ends the member’s session upon click.

2. Set a Redirect After Logging Out

  • Select the Log Out element on the canvas.
  • In the Element Settings panel (D), scroll to find the "Log Out Redirect".
  • Choose the page you want members to go to after logging out — in this case, select or link to your Log-in page.

3. Configure Page Access Rules

  • Go to Site Settings > Memberships > Access Groups.
  • Make sure that:
  • You’ve created a Members group that only lets logged-in users see members-only pages (like your Home page).
  • Your Log-in page is publicly accessible, so clients (non-members) can view it.

4. Allow Logouts From Any Computer

  • Webflow Logs users out from all devices only if you implement token invalidation manually, which is not possible with current Memberships configuration.
  • However, members can log out anytime from any device using your log-out button.
  • If they forget to log out on another device, they’d remain logged in unless sessions expire.

5. Optional: Hide the Log-Out Button for Logged-Out Users

  • Use member-based conditional visibility:
  • Select the Log Out button.
  • Go to the Element Settings panel, click "Add Condition".
  • Set to Visible when the user is Logged In.
  • This avoids showing it to guests or visitors who aren't signed in.

Summary

To create a working log-out button in Webflow:

  • Use the built-in Log Out element.
  • Use the Log Out Redirect setting to send users to the Log-in page.
  • Keep your Log-in page public for all users.
  • Use visibility conditions to hide the button from logged-out users.

This setup ensures members can securely log out and be redirected, while non-members or clients still have access to the Log-in page.

Rate this answer

Other Webflow Questions