SharePoint Online: Hide Site Contents Link from Quick Launch

Requirement: Hide site contents from quick launch in SharePoint Online.

How to Remove Site Contents from Quick Launch?

The Site Contents page in SharePoint Online provides a comprehensive view of all lists, libraries, apps, and subsites of the site. If you want to hide the site contents link in SharePoint Online quick launch navigation, do the following:

  • Navigate to your modern SharePoint Online site
  • Click on the “Edit” link under the quick launch navigation.
    sharepoint online hide site contents from quick launch
  • Click on the little three dots next to the “Site contents” menu item to get its context menu.
  • Select “Remove” from the context menu.remove site contents from sharepoint online
  • Click on the Save button to hide site contents from the quick launch

Now, “Site Contents” won’t be listed in Quick Launch navigation in SharePoint Online site!

Restrict Access to Site Contents in SharePoint Online:

How about hiding site contents from all users, except specific SharePoint Group? Well, When you have the publishing feature enabled, You can either remove or restrict the site contents link from users based on the user group. Make sure you have activated SharePoint Server Publishing Infrastructure at both Site collection and site levels before proceeding. Here is how to hide site contents in SharePoint Online:

  • Click on Settings gear >> Select Site Settings.
  • Click on the “Navigation” link under “Look and Feel”
  • Select “Site contents” under Structural Navigation and Click on the “Edit” link.
    hide site contents in sharepoint online
  •  Set the Audience targeting to the required SharePoint Group.
    sharepoint online restrict access to site contents
  • This hides site contents link from all users except the one specified in Audience targeting.

Hide Site Contents in SharePoint Online with CSS

If you are still using classic experience, you can add this CSS either to your master page or at page level using the script editor web part.

<style> {

#sideNavBox a[href$="/_layouts/15/viewlsts.aspx"] {
    display: none;

In modern team sites, use this CSS to remove site contents from SharePoint Online

.ms-Nav-navItem a[href$="/_layouts/15/viewlsts.aspx"] {
         display: none;

Here is my another post on removing site contents from quick launch: How to Hide Site Contents from Quick Launch in SharePoint?

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

2 thoughts on “SharePoint Online: Hide Site Contents Link from Quick Launch

  • September 15, 2021 at 2:55 AM

    Hi Salaudeen,

    I love your article. This is exactly what I’m trying to do, however I want to hide the Site contents on all pages on the SharePoint sites. Hence I’m assuming I have to update the master page. Which master page do I need to update? I can see the following 4:


    Additional, I wish to allow the site contents to not be hidden for a single Admin page which is on accessible by admin users. How would I be able to achieve this?

    Thanking you in advance.


Leave a Reply