Configuring the Front-End Login Url
Since Sitefinity 5.3 you have the ability to set a FrontEndUrl property, which is defined at the Site level and can be also granluarly configured per site in a Multi Site instance. The FrontEndUrl is url of a page, that you will be redirected to if you access a protected frontend page in you web site.
This way you can directly control the logic of how to prompt users for login, when they are trying to access a restricted resource or action.
For single site the setting can be located under Sitefinity backend ->Administration ->Settings ->Advanced -. Project ->Default site -> FrontEndLoginPageUrl:
When you are working with Multisite Management you could have separate FrontEndUrl for each site, and this is configured for each site when setting the site properties:
For more information and an example use case for configuring this property you can look into the Display the Reply buttons in Forum threads and Forum posts section of this article from our documentation.
Extending the logic
Alternatively, if you want a more custom-tailored solution, since Sitefinity 5.2 there has been an event for unauthorized access on front end page, where you could redirect the response depending on your needs. The example below is showing how to perform the redirect. It is not just a configuration, but it is much more flexible.
sender, EventArgs e)
//subscribe to Bootstrapper.Initialized event
sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
var url = unauthorizedEvent.Page.Url.TrimStart(
//for this specific page redirect to CustomerLoginPage
//for all other pages redirect to the Sitefinity login page
//if you do not use the else clause you will be redirected to the Sitefinity login page in all other cases different that the above one
You have the ability to redirect the unauthorized users to a specific page or redirect them to other Sitefinity pages.
The source code above should be placed inside the
Application_Start method of a Global.asax.cs file. To add such file in your Sitefinity project follow the steps below:
1. Open your project in Visual Studio
2. Right click on your project and select Add -> New item..
3. Search for Global.asax
A Global.asax.cs file could be found attached.