How can I configure ASP.NET/IIS to show custom error pages (i.e. a nice friendly error page), but to still return a 404/500 status code so that google does not try to index the page?
I have tried setting the Response.StatusCode to 404, but then the nice error page does not show anymore.
I have not tried this yet, but this page describes the exact issue and how to solve it. ASP.NET’s way of returning 302’s for error pages is a known SEO “issue”.
http://weblogs.asp.net/paxer/archive/2010/05/31/asp-net-http-404-and-seo.aspx