I'm working on a website that uses IIS and needs a custom 404 page created. I made 404.aspx and added the following code to my web.config file
<customErrors mode="On" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="404.aspx"/>
It does work (nonexistantpage.aspx shows the contents of 404.aspx) but when I check the header response code, I see a 200 instead of a 404 (a big SEO no-no). Any ideas on how I make it show the correct error response code?