Legacy Knowledge Base
Published Jun. 30, 2025

Hide default login page /c/portal/login

Written By

Jose L. Bango

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • Is it possible to hide the default /c/portal/login page?
  • We want users to use a specific login page, and prevent them from using /c/portal/login to log into the portal.

Environment

  • Liferay DXP 7.0+

Resolution

  • You can leverage auth.login.url property to achieve this:
  • # Enter a URL that will be used to login portal users whenever needed. By 
    # default, the portal's login page is used.
    #
    # Env: LIFERAY_AUTH_PERIOD_LOGIN_PERIOD_URL
    #
    #auth.login.url=/web/guest/home
  • For instance, you can configure that property so that it points to a URL where the Sign In widget/portlet is not available (auth.login.url=/web/guest/myhome), so users can't log into the portal.
  • In addition, you will need to offer a new way to log-in. For example, add a Sign In widget to a page (web/guest/myloginpage) and hide that page from your navigation menus if desired.
  • When users try to access /c/portal/login they will be redirected to /web/guest/myhome with no log-in option.
  • Only those who go to web/guest/myloginpage will be able to log into the portal.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base