PAGE NOT FOUND ERROR PAGE IN SHAREPOINT 2013



Default PageNotfound\404 page - By default, all the Publishing sites contain a default Error\404 page “PageNotFoundError.aspx” page which is added to the “Pages” library (See below).
404 Error page  SharePoint 2013This page can be modified to add some custom text.
“Error Page” Content Type - To allow users to Create a new 404 Error page, Publishing Sites now contain a new Content Type “Error Page“.This Content type Inherits from “Page” Content type and has a typical layout of a Page Not found or 404 pages. To find this Content type Navigate to Site Settings -> Content Types -> Error Page.
"Error Page Content type- SharePoint 2013"
Create a New PageNotFound or 404 Page – To Create a new 404 page admins can navigate to the “Pages” Library and under the “Files tab” select “New Document”.In the “New Document” drop-down menu select “Error Page” (see the screen below).
"404 Error Page SharePoint 2013"
"404 Error Page SharePoint 2013"

Once you have Created a new Error Page you can modify it by simply clicking the page in the pages library and editing it.
"Edit 404  Page SharePoint 2013"

Once done Check In and Publish the page.
Set Custom Error\404 Page as default - 
  • Rename "your" custom error page to PageNotFoundError.aspx and delete the out-of-the-box. 
  • Use the FileNotFoundUrl via Visual Studio. Get the SPSite server relative URL or absolute URL to the file not found page. This value is used as a redirect URL for an HTTP request where the resource cannot be found.

Anyway, this feature will be a great addition to both Intranet or internet SharePoint sites.

Comments

Popular posts from this blog

Send Mails in SharePoint Event Receiver

Get Host site list items in SharePoint Hosted App.