Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > how to change status code of a page View modes: 
User avatar
Member
Member
lightwork.info - 9/14/2011 3:34:00 AM
   
how to change status code of a page
my 404 page or page not found is displaying a 200 status code. is there a way to change this?

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 9/15/2011 6:39:29 AM
   
RE:how to change status code of a page
Hello,

What way you have created that page? Is it part of the Content tree documents or rather the physical document on the file system? Either way, you need to "register it for the system" in Site Manager -> Settings -> Your_Site ->Web site -> Page not found URL.

This way, the 404 response is always thrown when requesting this page.

Best regards
Ondrej Vasil

User avatar
Member
Member
lightwork.info - 9/18/2011 8:43:02 PM
   
RE:how to change status code of a page
Hi,

I've actually configured my 404 page as you've stated. but when i check the header status of that page it shows 202 instead of 404.

Regards,
Willy

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 9/19/2011 1:47:07 AM
   
RE:how to change status code of a page
Hello,

If that page is a document from the Content tree, the 404 response is thrown and immediately after that there gets loaded particular document which throws 200 response at the end. This is basically enough for search engines to recognize that the requested page is not available.

If you want the final status code to be a 404 one, you need to create a page not found page directly on the file system (as an ASPX page) and map it the same way in the Site Manager -> Settings section.

Best regards
Ondrej Vasil