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.
- 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.