I have subsite that I'd like to point back to the main corporate site when I click on the SharePoint site logo as the image attached suggests.
enter image description here Is there a way to do it?

Thanks in advance.


There are multiple solutions to this problem. You can for example follow this blog post this blog post about altering the SharePoint masterpage. As your picture is displaying the "Office 365" logo, i´m assuming you are using SharePoint Online. If that´s the case i would rather use a javascript to change the href source in the logo. To change the url with javascript follow this link, or look at this thread.

Personally I would recommend the javascript model. It is a bit more work, and would only work for every page/library you add it to if you don´t put it in the masterpage.

  • Ok, thanks. For the JS script solution I must have to specify the url that I want to refer to, or am I missing something? – Steve Morley Nov 17 '15 at 13:12
  • Hi, ~sitecollection/ should be enough to reach your goals. – Andreas Nov 17 '15 at 21:55

In SharePoint Online we can change the site collection URL on Site Logo using JavaScript. We need to change the id of the logo as some OOB script runs which change it and this can happen after your script runs, and so the URL isn't changed.

Simply add below script in your master page, and it should do the job


function SetHomeLink()
    var siteCollectionUrl = window.location.protocol + "//" + window.location.host + _spPageContextInfo.siteServerRelativeUrl;  
    var oldLogoId = $("#DeltaSiteLogo > a").attr('id');
    $("#" + oldLogoId).attr('id','CustomSiteLogo');
    $("#DeltaSiteLogo > a").after("<a id='tmpDeltaSiteLogo' href='#' style='display:none'>Dummy</a>");
    $("#tmpDeltaSiteLogo").attr("id",oldLogoId );
    $("#CustomSiteLogo").attr('href', siteCollectionUrl);

Note: I have referred this Link which Andreas has mentioned in his answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.