Seamlessly Redirecting Users to Subpages in Power Pages: A Complete Guide
When developing web applications, one of the most common features you might need is the ability to dynamically redirect users to different subpages based on certain conditions, such as whether they are logged in or not. This ensures a smooth and personalized experience for users navigating your portal.
In this guide, we’ll walk through how to set up redirection in Power Pages based on user authentication. Whether you’re building a public-facing portal or a member-only dashboard, this solution will help you ensure that users land on the right page based on their status.
In our example, we want to redirect users based on their authentication status:
- Non-authenticated users should be redirected to a Landing Page.
- Authenticated users should be sent to a Dashboard page.

By default, when users access your Power Pages portal, they land on the homepage. In this case, you want to check if the user is logged in and redirect them accordingly.

We’ll use a Web Template in Power Pages. This template will contain the necessary JavaScript to check if the user is logged in and redirect them based on that.
- Navigate to the Power Pages Admin Portal and go to Web Templates.
- Create a New Web Template.
- Paste the following code into the template:

P.S. These below lines are included from the Default Studio Template. Don’t forget to include in your code.

Next, create a Page Template and add the newly created Web Template.

Go to Web Pages and update the Page Template as well. Click Save.

And voila! The default landing page appears as soon as I access the website.

With this simple solution, you can enhance the user experience by ensuring that visitors to your Power Pages portal are always directed to the content that’s most relevant to them.
Happy Building!
We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com