I have created a new Site Master page in my site. I want to assign the master page to just one single sub-site page. I've attempted to change the "MasterPageFile" but was unsuccessful (I know this is set as a referential). The Site Master Page is in both my subsite and master site's master page's folder. Is there a specific URL path to use to change the MasterPageFile at runtime?

  • the correct approach is to use MasterPageFile. Show us what you've tried. Commented Sep 11, 2019 at 17:57
  • I attempted to use '~masterurl/newmaster.master' which is the name of the .master page in both the subsite master pages and parent site.
    – Brian
    Commented Sep 11, 2019 at 18:01

2 Answers 2


You can refer your master page in different ways as shown below:

  1. Site Collection-Relative Master Page: ~sitecollection/_catalogs/masterpage/custom.master

  2. Site-Relative Master Page: ~site/_catalogs/masterpage/custom.master

  3. Relative path are based on where the page resides: "../_catalogs/masterpage/custom.master"

Hope it helps. Thanks.


I have answered my question. I was trying to edit a site page instead of a publishing page.

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.