I have a Web Applcation which contains a Publishing Site with Variations feature enabled. The following is and example URL for the site http://test-server.com/en

However when I type a wrong URL, an error occurs it takes me to Page Not Found error page but the URL changes to the following:


I want the URL to point to the following domain name URL:


and not to local URL like:


How can 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:


  • Thanks for that answer. However I have a Variations site with English and Arabic versions to it. Now I want to have two different Error pages one for Arabic and one for English. How can I achieve that? Jun 19, 2020 at 12:41

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.