How to make Service Portal your instance login page
New article articles in ServiceNow Community
·
Oct 21, 2025
·
article
Service Portal brings your enterprise applications into a streamlined user experience. So why not make it your default login page? This article shows you how to use the SPEntryPage script include to configure the Service Portal as the primary login page for your instance.
| Before you begin Target role: Administrator Experience required: Knowledge of SSO, URL redirects, and the ServiceNow platform Note: This article is part one of a series on configuring the Service Portal login using the SPEntryPage script include. |
|---|
Configure the SPEntryPage script include
The SPEntryPage script include is like a login handler for the Service Portal to establish the destination URL for user login. You can configure the Service Portal page to include the login widget or the default landing page.
Note: This setup applies to all unauthenticated users. Different login experiences based on roles can’t be established prior to authentication.
1. Go to the sys_properties table and find the glide.entry.page.script property.
If the property does not exist, create it as a string type.
2. Set the property value to new SPEntryPage().getLoginURL().
This change directs the platform to use the SPEntryPage script include to determine where users log in and uses the default portal, unless you make changes described in the following step.
3. Open the SPEntryPage script include and edit line 22.
4. Replace /sp/ with the URL suffix for your portal instead of the default value sp.
SSO tip: The slash character (/) after /sp may cause issues when configuring single sign-on. If you experience issues, try removing the character from the script.
This is a supported customization. However, when you upgrade your instance, remember that modifying the SPEntryPage script include sets sys_customer_update to true and sys_replace_on_upgrade to false. It won’t be upgraded with future updates.
Configure the login page for your portal
1. Go to the sp_portal table and open the portal you want to use for login.
2. Verify that the Login page field is set to the page you want to use for login.
3. The login page must include the login widget or the default landing page.
After completing these steps, your instance will now direct all users to the Service Portal at login, creating a more seamless experience across your applications. If you ever need to adjust the configuration, you can revisit these steps or update the portal’s login page settings.
Important notes
Configuring Service Portal as a login page does not guarantee users are redirected to the portal after login. That behavior is controlled by a separate system property and depends on the URL the user is trying to access.
The script is not intended as a secure means to prevent users from accessing the platform UI. After login, they can still use the instance as normal as configured for post-login redirection.
Additional resources
https://www.servicenow.com/community/service-portal-articles/how-to-make-service-portal-your-instance-login-page/ta-p/3409588