User-1330468790 posted
Hi hamed_1983,
I presume that you are constructing a webform project since I think the setting you used will not bother you in MVC project.
Solution:
The solution is to change the httperrors' mode to 'Custom' and remove the '404'
default error page and add your error handler for the web server.
Settings:
<system.web>
......
<customErrors mode="On" defaultRedirect="~/Error.aspx">
<error statusCode="404" redirect="~/Error.aspx"/>
</customErrors>
......
</system.web>
<system.webServer>
......
<httpErrors errorMode="Custom">
<remove statusCode="404"/>
<error statusCode="404" path="Error.aspx" responseMode="Redirect"/>
</httpErrors>
......
</system.webServer>
More information about <httpErrors>, you can refer to below link:
https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httperrors/
Also, in some online seo checkers (such as
this), i'm facing the "Custom 404 Page" negative value problem!! I think it can not detect my error page.
I am not familiar with SEO checkers and the problem of the nagative value. However, based on your problem of the 'Custom 404 Page', I can do a guess that it might be caused by a failure/absence to provide
a redirect page for 404 error.
Hope this can help you.
Best regards,
Sean