I have a web application which contains 2 site collections and the site collections have subsites.

Currently the first site collection is deployed under the root:


While the other site collection and its subsites have the following urls:



Currently all the site collections and subsites will have the same logo picture, but if you click on the logo it will redirect to the current site collection or the current sub site.

Can I force the logo to always redirect to the root site collection?
I know I can modify the master page for each site collection and subsite, but I'm asking if there is a more general approach that can affect all the current logos at once?

2 Answers 2


I don't believe of any out of the box methods.

I would create a solution package with the custom masterpage, you will need to hook into the FeatureActivated method to apply the masterpage to the site collection and sites below.

You may also want to create a Staple feature which activates itself on all new site collections or sites


You can elegantly do it by injecting jQuery code in any javascript file included in Layouts folder:

$(document).ready(function () {
    ExecuteOrDelayUntilScriptLoaded(changeTitle, "sp.js");

function changeTitle(){
    var url = _spPageContextInfo.siteServerRelativeUrl;

    $("a.ms-siteicon-a").attr("href", url);
    $("a.ms-siteicon-a").attr("onclick", "");
  • i tried adding a script inside my style library as you mentioned, then i reference the script inside my master page after the " <SharePoint:CustomJSUrl runat="server" />" code but this will not chnage the redirect url for the logo ..
    – John John
    Commented Sep 17, 2015 at 11:50
  • Does javascript code fire at all? Commented Sep 21, 2015 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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