If you plan to use any Sitefinity CMS page as a custom error page, you must change the response status explicitly. The default is 200, instead of 400 and this is misleading for the search engines and SEO practice.
To do this, perform the following:
NotFoundStatusCodeSetter : System.Web.UI.UserControl
"404 Not Found"
Response.StatusCode = 404;
The code above sets the response statues code to 404 only on the frontend. This is handled by the IsDesignMode method. You must add the status code at a latest possible moment - in this sample, in the Render event.
The proper response status code is displayed when requesting a page that cannot be found.
Back To Top