Add Custom 404 error Web page in Microsoft SharePoint Server 2010
1- Log on to the computer that is running SharePoint Server 2010 by using an account that has administrative permissions.
In Windows Explorer, locate the following folder:
%systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\[LangID]
In Windows Explorer, locate the following folder:
%systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\[LangID]
LangID: 1033 for English, 1025 for Arabic
2- Create the custom HTML file:
On the computer that is running SharePoint Server 2010, copy the Sps404.html file to a temporary folder.
Rename the Sps404.html file. For example, give the file the following name:
Custom404.html
Add the custom content to the Custom404.html file by using an HTML editor
3- Copy the Custom404.html file to the %systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ LangID folder.
On the computer that is running SharePoint Server 2010, copy the Sps404.html file to a temporary folder.
Rename the Sps404.html file. For example, give the file the following name:
Custom404.html
Add the custom content to the Custom404.html file by using an HTML editor
3- Copy the Custom404.html file to the %systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ LangID folder.
Same folder from where you have copied Sps404.html file
4- Run the following PowerShell command from the SharePoint 2010 Management Shell:
(Get-SPWebApplication http://sp2010).FileNotFoundPage = "Custom404.html"
(Get-SPWebApplication http://sp2010).FileNotFoundPage = "Custom404.html"
or
$webapp =Get-SPWebApplication http://<serverUrl>:<port>
$webapp.FileNotFoundPage = "Custom404.html"
$webapp.update()
5- Verify that the property is set by running the following command:
(Get-SPWebApplication http://<serverUrl>:<port>).FileNotFoundPage
$webapp.FileNotFoundPage = "Custom404.html"
$webapp.update()
5- Verify that the property is set by running the following command:
(Get-SPWebApplication http://<serverUrl>:<port>).FileNotFoundPage
or
$webapp =(Get-SPWebApplication http://sp2010).FileNotFoundPage