Legacy Knowledge Base
Published Jul. 2, 2025

How to hide a site from indexing robots

Written By

Rodrigo Mier

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • How to disable robots in some pages and how to disallow the robots indexers to reach an environment.

Environment

  • DXP 7.0
  • DXP 7.1
  • DXP 7.2
  • DXP 7.3
  • DXP 7.4
  • Liferay PaaS

Resolution

  • You can define de robots indexation site configuration in the robots.txt 
  • To disable de robots indexation, you can define it in the robots configuration with the Disallow: / parameter.
    For example, from the public pages configuration to disable the index of all pages:
    • robots.png
    • To hide individual pages:
      •  Disallow: /page-name
    • This means that the robots indexers can reach the site and their information but their are not going to index the defined pages because of the configuration policies.
  • With Liferay PaaS it is easy to disallow robots to reach an environment with an authorization layer. This layer guarantees that the robots will be unable to reach the site. Not simply indexer policies.
    From the Webserver, we can define an authorization layer before reach the site with the following properties in their .conf file:
       auth_basic "Authentication Required";
      auth_basic_user_file /var/www/html/.htpasswd;

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base