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 site lists, libraries, apps, and subsites. If you want to hide the site contents link in SharePoint Online quick launch navigation, do the following:

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

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

Restrict Access to Site Contents in SharePoint Online:

How about hiding site contents from all users, except a 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:

  1. Click on Settings gear >> Select Site Settings.
  2. Click on the “Navigation” link under “Look and Feel”
  3. Select “Site contents” under Structural Navigation and Click on the “Edit” link.
    hide site contents in sharepoint online
  4.  Set the Audience targeting to the required SharePoint Group.
    sharepoint online restrict access to site contents
  5. 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 - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

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

  • Hey Salaudeen,
    your solution is nice to just hide the link to site content page. There is also a link on the top right menu you can also hide with the css method. But this all won’t prevent users from visiting the content page via link that is well know on the internet 😉
    Do you know a method to really block access to this page by non authorized users?
    Best regards,

  • 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

Your email address will not be published. Required fields are marked *