Custom 404 on Microsoft IIS

Working on a website on a Microsoft IIS server, I wanted to create a custom 404 page, as the site has fewer pages than its previous incarnation. I made a page and added some lines to the web.config file so 404s go to it, and it all appears to work.
But now Google WMT is complaining about Soft 404s. It seems that the server is not returning a 404 error code.
Has anyone any experience of configuring 404s on IIS via the web.config file?

Which version of IIS are you using? Recently, the new IIS 10 version was launched which has several new features. Please specify the version.

I was starting to think that no one is using IIS out there.

I think it is 8.5, I only found out because of this Site ignoring htaccess redirects - need IIS web.config
I’m more used to dealing with htaccess, web.config is new to me. I only have FTP access at present, so the web.config file is my only means to set thing up. It looks something like this.

<?xml version="1.0" encoding="UTF-8"?>
      <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Permanent">
         <add wildcard="*.html" destination="/" />
       <remove statusCode="404" subStatusCode="-1" />                
       <error statusCode="404" path="" responseMode="Redirect" />
        <customErrors mode="RemoteOnly" defaultRedirect="" />

The redirects appear to work, but WMT says they are soft 404s.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.