<img alt="" src="https://secure.make6pain.com/194280.png" style="display:none;">

How to Create a Custom Error Page for SharePoint

CreateCustomError.png

Branding your digital workspace is essential to creating a company identity. This includes not just the functional pages, but even the error pages. SharePoint development can be a headache to get the hang of. To learn how to create custom error pages in SharePoint, follow this tutorial. 

 

To create a custom error page for SharePoint, in Windows Explorer, locate the following folder:

%systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\LangID 

Note: 

In this path, %systemdrive% represents the actual drive name of the drive on which the operating system is installed.

In this path, LangID represents the actual language ID of the language that you use. For example, 1033 is the language ID for U.S. English. 

 

     

Step #1:  Create the custom HTML file:

1.  On the computer that is running SharePoint Server 2010, copy the Sps404.html file to a temporary folder. 

2.  Rename the Sps404.html file. For example, give the file the following name: Custom404.html

3.  Modify and design the new Custom404.html file to suit your needs for a custom 404 error message using notepad or an HTML editor.

4.  Copy the Custom404.html file to the %systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\LangID folder.

 

   

Step #2:  Run the following PowerShell commands from the SharePoint 2010 Management Shell:

      
   $webapp =Get-SPWebApplication http://<serverUrl>:<port>
   $webapp.FileNotFoundPage = "Custom404.html"
   $webapp.update()
   

 

 

Step #3:  Verify that the property is set by running the following command:

         
(Get-SPWebApplication http://<serverUrl>:<port>).FileNotFoundPage 

 

 

Additional Notes:

In this code, <serverUrl> represents the actual URL of the Web application where you are setting the custom 404 error page. 

In this code, <port> represents the nonstandard port number, if any, that is assigned to the Web application. 

In this code, Custom404.html represents the actual name that you created for the custom HTML file.  

By default in SharePoint Server 2010, the FileNotFoundPage property is set to the "null" setting.


Enjoy!

 

For more tricks like this one, make sure to subscribe to the Codesigned blog! For a completely customized SharePoint experience, check out IntranetPro. 

Learn More

Related Content
Your Intranet Needs a Reboot Now More Than Ever
A decade ago, remote working was rare. Many organizations believed that remote workers were harder to manage, less effective, and too easily ...
Jake Weaver
Jake Weaver
Why Organizations Are Doubling Down on Internal & Crisis Communications Right Now
Open, clear, concise communication is integral to the smooth functioning of an organization at the best of times, but never more so than during times ...
Luke Warren
One Key Lesson From The COVID-19 Crisis
A conversation between Jake Weaver, CEO of Codesigned, and Alison Davis, CEO of Davis & Company.
Codesigned
SharePoint Framework (SPFx): Microsoft BOT framework integration
Download / Source code SPFX web part : https://github.com/get2pallav/BT/tree/develop
Pallav Mathur
5 Signs of Poor User Experience Design
UX (User Experience) design is one of the most important elements of a site. Essentially, sites with good UX design are intuitive and usable while ...
Aaron Bandoly