Change the Title of a SharePoint 2013 site with JavaScript

A client wanted to change the title of a SharePoint 2013 site: the Search Center. Changing the site name or the results.aspx page wouldn’t do the trick.

Using the F12 function in IE I quickly found out that the title shown on a page is just a span element:

<span id="DeltaPlaceHolderPageTitleInTitleArea">Site Title</span>

That means we can adjust that very easily with javascript:

document.getElementById("DeltaPlaceHolderPageTitleInTitleArea").innerHTML="New Site Title";

WARNING: this will not change the title itself, just the title shown on the page!

About: Marijn

Marijn Somers (MVP) has over 14 years experience in the SharePoint world, starting out with SP2007. Over the years the focus has grown to Office 365, with a focus on collaboration and document management. He is a business consultant at Balestra and Principal Content Provider for "Mijn 365 Coach" that offers dutch employee video training. His main work tracks are around user adoption, training and coaching and governance. He is also not afraid to dig deeper in the technicalities with PowerShell, adaptive cards or custom formatting in lists and libraries. You can listen to him on the biweekly "Office 365 Distilled" podcast.