Hiding _Layouts Pages in SharePoint
Hiding_layouts pages in SharePoint is essential for improving security and SEO. These application pages handle backend operations and should not be accessible to the public or search engines. By hiding them, you can prevent unauthorized access and ensure search engines focus on indexing the right content.
For sites built using the “publishing site” template, the ViewFormPagesLockDown feature is activated automatically. This feature blocks access to “_layouts” pages, ensuring they remain hidden from unauthorized users and search engines. However, if you’re using other templates like “team site” or “blank site”, this feature is not enabled by default. Fortunately, you can activate it manually to protect your site.
What Are _Layouts Pages?
_Layouts pages are application pages stored in the “_layouts” directory in SharePoint. These pages manage administrative tasks such as settings and configurations. While they are vital for backend operations, they:
- Pose Security Risks: Exposing these pages may allow unauthorized users to access sensitive information.
- Cause SEO Issues: Search engines may index these irrelevant pages, lowering your site’s visibility for more important content.
- Security Risks: Unprotected “_layouts” pages allow unauthorized users to view or manipulate backend operations.
- SEO Issues: These pages add unnecessary content for search engines to index, leading to poor site rankings.
How to Activate the ViewFormPagesLockDown Feature
If your site template does not enable the ViewFormPagesLockDown feature, you can activate it manually. Follow these steps:
- Open the SharePoint Management Shell.
- Run the following command: