Disable Redirect to Home Page After Email Verification OR Redirect New User to NOT the Home Page

Hello,
I have two versions of a home page. One is for non-logged-in users, and the other is for logged-in users.
My problem is that when a user signs up for an account with my website (i.e., becomes a “member” of my website), they receive a verification link in their email which they click and then are redirected to my home page. Given that they are now “logged in” I want to redirect them instead to the second version of my home page.
OR, I could just disable that redirect, so that the user - after verifying their email - just has to open up the site and hit Login. (Though they may still be detected as Logged in. In which case, I would want to log them out so that they can log in.)
How would I go about either of the above two routes?

I have figured out how to redirect new user to alternative home page. I referred to this article: Redirect Users to a Specific Page after Registration | Webflow User Accounts ( Memberships ) | Sygnal-U. The code I used was:

script tag

// Check if the referrer is the signup page
if (document.referrer.includes(“/sign-up”)) {
// Redirect to the members-only page for logged-in users
window.location.href = “/logged-in-home”; // Change this to the actual URL of the logged-in home page
}

closing script tag

I put this custom code in header of first version of home page.

1 Like

Hi Jacqueline, I’m glad you found my article-
Typically this is the easiest way in Webflow, you have a standard homepage and then a special user-specific homepage.

If you’re trying to combine them at / then the best way is to use a single page design with conditional visibility to hide and show your sections depending on login state.

That can be extended further with SA5 to support conditional visibility by access group, but it typically involves a bit of custom code to build that.

If you wanted to take it to a whole other level, the direction I use is to reverse proxy the site, and the transform pages for the user. Then you can actually have completely different pages at / returned depending on the user’s access group. However this is a complex build, so typically you’d only do this when you’re delivering sensitive content.

I tried exactly this, but it does not work on my side.

My case is the following:

  1. user signs up
  2. user sees “verification required - check your email” screen
  3. user clicks on button/link in the verification mail
  4. user sees “account activated” screen with a login button below
  5. after 2 seconds page suddenly jumps to the homepage

Step 5 does not make sense for my use case. I want the user to stay on step 4, or the page jumps to a custom page. In my case a “success” page.

I tried the code from above on my homepage. But it does not work. Did I missed something?

On the log-in page, select the form element directly, then check settings, you can choose where it will redirect after a login, if the user simply logged in directly.

If you need to redirect to a page not in Webflow’s list, you can use SA5’s user lib for this;