Developer forum

Forum » Development » Custom 404 page return status 200

Custom 404 page return status 200

Jose Caudevilla
Reply

Hi,

 

I have created a custom 404 page created inside my website.

This page only contains a custom paragraph and the url  is set up as /404:

 

 

When i go to this url404 page the return status is 200.

Then i change the website configuration to set the 404 page to this page and the problem still happen

 

Finally, i change my web.config file:

 
  <httpErrors errorMode="Custom">
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/404" responseMode="ExecuteURL" />  
    </httpErrors>

 

And i have the same problem, the /404 page still returning status 200.

 

Is something wrong?

 

Regards, 

Jose.

 


Replies

 
Nicolai Pedersen
Reply

The page lives on /404 and exists, hence it returns 200 - because it is found. 404 is only send if page does not exist...

But if you access /doesnotexist it will show the 404 page on the /doesnotexist url with a 404 response

 

You must be logged in to post in the forum