I have a WebApplcation which contains a Publishing Site with Variations feature enabled. The follwing is and example url for the site "http://test-server.com/en"

However when I type a wrong url or an error occurs it takes me to PageNotFound error page but the Url changes to the following "http://windows-pc:29420/pages/PageNotFoundError.aspx?requestUrl=http://localhost:29420/en/whatsfa"

I want to Url to point to the following domain name Url is "http://test-server.com/en" and not to local Url like "http://windows-pc:29420/pages/PageNotFoundError.aspx".

How Do I fix this problem?

1 Answer 1


Here is PowerShell to set your page not found URL:

$spsite = Get-SPSite "Web site URL"
$spsite.filenotfoundurl = "/sites/yoursite/Pages/PageNotFoundError.aspx"

Besides, customizing the 404 Redirection in SharePoint for your reference:


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.