After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page
You can use the below code:
Response.TrySkipIisCustomErrors = True Response.Status = "404 Not Found" Response.AddHeader("Location", "{your-path-to-your-404-page}")