Hide SharePoint 2013 Ribbon

In this article, I will show

How to hide the SharePoint 2013 ribbon?


Hide SharePoint Ribbon for only Anonymous Users / Visitors users

  • First, Check the Master Page name that has been assigned to your site.
  • Go to Site Action > Site Settings > Look and Feel > Master Page.

Master Page - look and feel

  • Below Site Master Page > Check the assigned Master Page name.

Mater Page Assigned

  • Open SharePoint Designer.

Open SharePoint Designer

  • Open your site > From left side Click on Master Pages.

Site Objects Master Pages

  • In SharePoint 2013 There are two related files for Master Page (HTML, Master).

Note: If you can’t find the HTML file, you will need to activate the SharePoint Server Publishing Infrastructure below Site Collection Administration > Site collection features!

  • Right Click on your custom Master Page with HTML extension > Check Out.

Check Out Master Page

  • Again, Right Click on Master Page with HTML extension > Edit File Advanced Mode.

Edit file in advanced mode

  • Search for DIV with ID “ms-designer-ribbon

< div id="ms-designer-ribbon" >

  • Surround it with this tag SharePoint:SPSecurityTrimmedControlto looks the following

<!--MS:<SharePoint:SPSecurityTrimmedControl runat="server"
<div id="ms-designer-ribbon" >
<!--SID:02 {شريط}-->
<!--PS: تشغيل معاينة للقراءة فقط (عدم التعديل) -->

color:white; width:100%; padding:8px; height:64px; overflow:hidden;"> سيكون شريط SharePoint هنا عندما تتم معاينة الملف الخاص بك أو عندما يكون مطبقاً في موقعك الخاص.
<!--PE: إنهاء معاينة للقراءة فقط --></div>


  • In PermissionsString attribute, you can add any permission type based on your requirement from the following:
    • FullMask.
    • EmptyMask.
    • ManagePermissions.
    • ManageSubwebs.
    • ManageWeb.
    • AddAndCustomizePages.
    • BrowseDirectories.
    • ViewPages.
    • EnumeratePermissions.
    • ManageAlerts.
  • From the left side,> Click on Master Pages > Right Click on your custom Master Page > Check In.

Check in master page

  • Save the changes.

Save changes in master page

  • Publish Master Page.

Publish Master Page

  • Now, open your site with a user who has Read permission or Anonymous. The ribbon should be hidden.

Ribbon hidden

  • Open your site with a user who can manage permission. The ribbon should be shown.

Ribbon Shown

Hide SharePoint 2013 Ribbon for all users using CSS

  • Follow the previous steps to open your custom master page,
  • Simply, search for DIV with ID "ms-designer-ribbon" and add this style (style="display: none !important;") to be like this :
<div id="ms-designer-ribbon" style="display: none !important;">

See also

How to hide the ribbon in SharePoint 2010

4 thoughts on “Hide SharePoint 2013 Ribbon

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s