Hi we have internet public website for anonymous users can view without login, these pages display some reports but still anonymous users can view all site contents and goes to any pages and library of this sites and sub sites.

_layouts/15/viewlsts.aspx Forms/AllItems.aspx?RootFolder=

anonymous user should only see the content published in pages only not go inside of site or subsites How to add anonymous user to group

enter image description here

1 Answer 1


You have two possibilities in this case that doesn't require code.

1) Change the permission level of anonymous users When you change the permission level from "Read" to "Restricted Read" your anonymous user won't see the site contents anymore.

Example - You can add anonymous users to the Restricted Readers group. Or Create a custom group and assign "Restricted read" permission to it.

enter image description here

2) Alternate read permission level of anonymous users You can simply remove the base permission "View Application Pages" from the "Read" Permission level or create a custom permission level and remove "View Application pages" permission from it by unchecking it as below for anonymous users:

enter image description here

The "site contents" is not the only place where user will see this navigation option. It is also available through the gear icon on the suite bar. By changing the permissions or permission level it will be hidden from there too.

In the masterpage , you try below code in masterpage:

Find the SharePoint:SiteActions tag, inside it you will find

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents",

change PermissionsString="" property to:


Reference - Hide site content for visitors

Security trimming publishing site

3) Activate the limited access user permission lockdown mode feature

This feature will block users to view list view pages. Users can able to access all other web pages.

In 2010, we had the FormpagesLockDown feature, however, in 2013 we need to activate this feature "limited access user permission lockdown mode".

enter image description here

  • updated answer. Nov 28, 2016 at 9:35
  • if i enable lockdown feature is anonymous users loose any features in this internet site?
    – adilahmed
    Nov 29, 2016 at 8:23
  • and how to add anonymous users to the Restricted Readers group ? for anonymous what is the user address?
    – adilahmed
    Nov 29, 2016 at 8:29
  • expertsupdates.com/ArticleAttachments/sharepoint/… Check the image. In the SharePoint groups page, you will find this group anonymous user. Click on edit permission and change it to restricted read. Nov 29, 2016 at 9:01
  • Also, if you enable this permission, following will happen: 1. Allows anonymous users to only view the Publishing pages, not any of the form or view pages (DispForm.aspx, AllItems.aspx) 2. Disallows anonymous access to pages in the _layouts directory that inherit from LayoutsPageBase. Nov 29, 2016 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.