SharePoint 2013 Hide Ribbon from Anonymous users

In this post, we will discuss how we can hide ribbon from anonymous users in SharePoint 2013. If your site is accessible by anonymous users then we can hide the ribbon from anonymous users by doing the following customization.

New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

Also, read:
Add an app page showing loading SharePoint 2013

View ULS Logs using SharePoint LogViewer in SharePoint 2013

Apps for SharePoint 2013 NOW SharePoint 2013 Add-ins

Here we need to modify the master page, so first take a backup of the master page or you can create a new master page from the existing master page and can modify on that.
Here we are going to modify in the Seattle.master page
, so I have taken a backup of the master page.

Now open your SharePoint designer, click on Master Pages from left side Site Objects. It will open the master page list. Select the particular master page Right click Check out, then Right click and click on Edit File in Advanced Mode.

Then in the master page search for <div id=”s4-ribbonrow”>

Modify that line withe style=”Display:none” attribute which should look like below:

<div id=”s4-ribbonrow” style=”display:none”>

Then go to the end tag. You can put mouse cursor in the above line then right click and click on “Select Tag”. This will select the whole tag. And below to the end tag write the below stuff:

<SharePoint:SPSecurityTrimmedControl ID=”HideRibbonRow” runat=”server” PermissionsString=”ManageWeb”>

<script type=”text/javascript”>

document.getElementById(“s4-ribbonrow”).style.display = “block”;



Now Save the master page and login with anonymous user, the ribbon will not appear.

Hope this will be helpful.

Check out Best Alternative to InfoPath -> Try Now


(Installation & Features)

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →