Change SharePoint 2013 Site Logo Link to Root Site URL

By default, on clicking the SharePoint 2010 or SharePoint 2013 site logo – It takes us to the root of the current site or sub-site. But you may want to link logo to top level site.Well, to change this behavior you got to change the master page.

Important: Since this is a Master page change, You have to apply the updated master page to all site collections for the changes to take effect!
  • Open your Master page in SharePoint Designer 2010, Locate the below line:
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
  • Replace the ~site value with ~sitecollection .Save and close the master page (approve and publish, if required!) . This changes SharePoint 2010 logo link to root site collection.
    change sharepoint 2013 logo link URL
  • Open your SharePoint 2013 site in SharePoint designer 2013, Edit the master page in “Advanced Edit Mode”,
  • Locate the following code :
<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=23" runat="server"/>
</SharePoint:SPSimpleSiteLink>
  • Replace the control <SharePoint:SPSimpleSiteLink> with <SharePoint:SPLinkButton> and add the “NavigateUrl=”~sitecollection/” attribute to it.Here is the modified code:
<SharePoint:SPLinkButton NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=23" runat="server"/>
</SharePoint:SPLinkButton >

This changes logo link URL pointing from current site to Root Site!

change sharepoint 2013 logo link to root site

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!

5 thoughts on “Change SharePoint 2013 Site Logo Link to Root Site URL

  • October 31, 2019 at 6:16 PM

    I followed all the steps and published but it still doesn’t work.

    Reply
  • November 28, 2018 at 8:26 PM

    Thanks for posting this. However, despite following all these steps and editing the master pages on SharePoint Design Manager, I’m still unable to see the changes being applied to the SharePoint site. Any thoughts on what needs to be done additionally? I greatly appreciate your help.

    Reply
    • January 4, 2019 at 11:50 AM

      Try checking the page in and approving it.

      Reply
  • August 7, 2018 at 10:14 AM

    **In javascript :**

    Using SP Chrome editor, upload a file in style library and script link to this js.
    Edit the JS and add :

    window.onload = function(){
    Var urlLogo = “/sites/xx/xx/xx”;
    document.getElementById(“ctl00_onetidProjectPropertyTitleGraphic”).href = urlLogo;
    }

    Reply
  • April 6, 2018 at 3:17 PM

    What about redirecting it to a site page? The site Home page

    Reply

Leave a Reply