top of page
Crumpled Fabric

0

How to Redirect Users After Login on Wix

Click URL to copy

Sep 5, 2025

3 min read

WIX Ideas Team

Tags: Wix Location Wix Members Redirect Wix Members

How to Redirect Users After Login on Wix & Wix Studio (Step-by-Step Guide)

If you’ve ever wanted your Wix or Wix Studio website to automatically send visitors to a different page after they log in, you’re not alone. By default, Wix keeps users on the same page where they logged in—but what if you want them to land on your shop page, account page, pricing plan page, or any other specific page?

T

hat’s exactly what we’re going to cover in this guide, brought to you by Wix Ideas—your go-to resource for Wix tutorials, tips, and website templates.


Why Redirect Users After Login in Wix?

Redirecting users after login is more than just a convenience—it’s a powerful conversion optimization tool. Imagine:

  • A customer logs in and is instantly sent to your shop page, ready to browse and buy.

  • A member signs in and is directed straight to their account dashboard.

  • New sign-ups are automatically sent to your pricing plans page, encouraging upgrades.

At Wix Ideas, we use this feature often for eCommerce websites, membership platforms, and service-based sites built with Wix and Wix Studio.


The APIs You Need in Wix (or Wix Studio)

To set this up, you’ll be working with two simple Wix APIs:

  1. Wix Members Frontend API – This detects when a user logs in.

  2. Wix Location Frontend API – This allows you to redirect users to a new page.

The best part? You only need a few lines of code in your masterPage.js file. This ensures the login redirect works across your entire website, no matter where the user signs in.


Step-by-Step: How to Redirect Users After Login

Here’s a simplified breakdown of what we do at Wix Ideas when setting this up:

  1. Open your Wix (or Wix Studio) editor and head to the Code Files panel.

  2. Select masterPage.js so the code applies across your whole site.

  3. Import the Wix Members Frontend API at the top of your code.

  4. Listen for the onLogin event (this triggers right after a user logs in).

  5. Import the Wix Location Frontend API to handle the redirect.

  6. Add your page slug (prefix), so users get redirected correctly without relying on full URLs.

For example, if your shop page slug is /shop, you can redirect members straight there after login.


Why Use a Slug Instead of a Full URL?

At Wix Ideas, we recommend using slugs (like /shop or /pricing) rather than full URLs. That way, if you ever change your domain name, your login redirect will continue working without any extra updates.


Live Example: Redirecting to a Shop Page

We tested this on a demo Wix website. Whether we logged in from the homepage, the terms & conditions page, or even the refund policy page, the redirect always worked—sending us straight to the shop page.

It’s clean, it’s simple, and it’s a game-changer for Wix and Wix Studio websites.


Learn More With Wix Ideas

If you found this tutorial helpful, you’ll love what else we offer at Wix Ideas.


Final Thoughts

Redirecting users after login on Wix or Wix Studio is one of those “small tweaks” that can make a big difference in user experience and conversions. Whether you’re running an eCommerce store, a membership site, or a service business, guiding your visitors to the right page immediately keeps them engaged.


At Wix Ideas, we’re committed to helping you get the most out of your Wix and Wix Studio websites. Be sure to check out our tutorials, shop our ready-to-use templates, and subscribe to the Wix Ideas YouTube channel for fresh tips every week.

Code



Leave a comment (0)

Thanks for leaving a comment🎉

Tusar

Tusar

May 1, 2025

Wix page printing

You suggestion on printing wix page helped to create print icon but print was not initiated. please help in this regard.

Reply

January 20, 2000

ahmed

ahmed

May 19, 2024

wix form data

Hi i need your help also in wix form submission

the problem is that some fields are generated when $w.onReady(function () { like day & date and when i choose the student name i get the phone number from database .

and the form save only the field u fill it by ur self like input or dropdown

Reply

Walter Odibi

Walter Odibi

January 20, 2000

bromar

bromar

Sep 29, 2023

Love the tutorial!!!

You are truly great at creating these instructional videos!! Thank you! I am having trouble figuring out . . 'the triggered email' . . it is not being sent to the user submitting the form, the form and the email to the admin works great. . Could you point me to where this might have already been addressed? or any other help? On a second note. .the submit button success/failure message will go back to the default message once it's connected to the data set(I couldn't figure that out either. )

Reply

Walter Odibi

Walter Odibi

January 20, 2000

kaan

kaan

Jun 4, 2023

wishlist and rating system

hello sir I try today 2 hours but not working if you want I pay money can you do this 2 ( wishlist and rating star) system please I send to you invaid

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Hi there, you can contact me here using the in-app chatbox

Waqas

Waqas

Apr 16, 2023

Triggered Email Backend

Hi mate please can you send email by backend

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Hi Waqas, there isn't a backend code for this tutorial. The emails will be sent from the client-side.

Ghan

Ghan

Dec 29, 2022

Great Tutorial

Hi !

First of all, I want to thank you for your great tutorials, they helped us a lot with the coding.
But I still need your help, if you don't mind. I have based on Save Calculated Field using Wix Data Hooks Codes, to code my form . but the problem is I don't know why the code only reads the computation for "week2" computation and not the "weeks"

here is the code

I also did a separate column in the dataset where the chosen datas for both fields will be placed.

$w.onReady (() => {
$w("#Person").onChange(() => {
$w("#weeks").onChange(() => {
$w("#week2").onChange(() => {
let person = Number($w("#Person").value);
let weeks = Number($w("#weeks").value);
let week2 = Number($w("#week2").value);


$w("#totalLabel").show();

$w("#totalLabel").text = `"${String(weeks * Number(person))}페소"`; //DESIGN YOUR MESSAGE
$w("#totalLabel").text = `"${String(week2 * Number(person))}페소"`; //DESIGN YOUR MESSAGE

});
});
});

});

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Hi there, thanks for your comment. I see why this is a problem. The onChange() function seems wrong in combination.

To combine onChangeFunctions use this method

$w("#Person, #weeks, #weeks2").onChange(() => {

//code here

});

Walter

Walter

Aug 8, 2022

More Details? Watch video

Hi, you can click here to watch the video https://www.youtube.com/watch?v=9bx7-nBeZ5c

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter

Walter

Jul 11, 2022

For you

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter Odibi

Walter Odibi

Apr 18, 2022

Awesome Feature

This tutorial shows you how to display views on your Wix repeater.

📺WATCH VIDEO HERE https://www.youtube.com/watch?v=Iz7SdaCSdXg

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter Odibi

Walter Odibi

Apr 18, 2022

Amazing tutorial

This amazing tutorial will show you how to a comment section to your WIX dynamic page.

📺WATCH VIDEO HERE https://www.youtube.com/watch?v=f8-vJQFNZ_c

Reply

Walter Odibi

Walter Odibi

January 20, 2000

Walter Odibi

Walter Odibi

Apr 10, 2022

Great Feature🎉

This amazing tutorial will show you how to add a visitor view counter to your WIX dynamic page.

🚩MORE TUTORIALS https://www.wixgenius.com/wix-tutorials

Reply

Walter Odibi

Walter Odibi

January 20, 2000

RELATED TUTORIALS 🚀

Motion Gradient Text in Wix Studio

Motion Gradient Text in Wix Studio

Learn how to add an animated gradient text in Wix Studio

bottom of page