SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently changed our url from http ://servername to http ://urlname I changed the AAM to reflect this as well as alter the binding in IIS

It seems to work fine but when ever I create a new publishing page site I receive the following error - System.IO.FileNotFoundException:
at Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebUrl(Guid gWebId, String bstrSiteUrl)

If I revert the AAM back it works fine.

It seems to me that SharePoint still points to http ://servername/(path for page layouts) no matter how AAM is configured.


share|improve this question
up vote 0 down vote accepted

I'd recommend that you don't change the url of a SharePoint web application behind the back of SharePoint. And ajusting the AAM doesn't make that valid.

Instead you should delete the web application and create it using the new url, but the old content databases

share|improve this answer

Try to disable and enable the publishing feature in the site collection level. Additionally, make sure your masterpages do not refer to any files or scripts with absolute urls that contains hostnames before you enabled AAM.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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