So ... we have a custom CMS. We have a rewrite rule that any page request (when the file does not exist) is sent to the root / index.cfm file. There we look for our database for the page in question. If the page exists, we maintain the correct template, etc. If the page does not exist, I want the server on page 404. Now I โthinkโ that I cannot do this in IIS, since I need to process the request in CF, so it must go through. The file will always exist. When the page does not exist, I tried using <cfheader statusCode="404" > and then add some html, it puts The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. at the top of the page in front of my html. To display this page, I had to remove the 404 code handler from IIS.
Also, when I select Google, it gets 301. However, when I look at the response headers in Firefox, I get.
Transfer-Encoding: chunked Content-Type: text/html Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET Date: Wed, 16 Jan 2013 21:31:42 GMT 404 Not Found
I tried a combination of redirects and all kinds of things. I open IIS permission to handle 404 if there is a way, but I canโt figure out how to get Coldfusion to deliver 404 correctly so that Google understands this correctly. Webmaster Tools is angry with me because I am delivering โSoft 404sโ to this point, so I'm trying to fix it.
I also tried setting <httpErrors existingResponse="PassThrough" /> , no matter what it did, but it didn't work. I was looking for other topics, trying to figure it out, and just can't.
EDIT: By carefully examining the header information in Firebug and Chrome, I can clearly see that the headers say 404. Why is Fetch like Bing and Fetch, since Google says differently?
I tested the fact that if I add .cfm to the URLs, it will choose how Google will ship, see 404. However, without .cfm it thinks it is 301. Firebug sees it as 404. This seems like a problem with Google.
ANSWER View:
So, this morning I did more tests (right after I actually added the bounty), and I noticed that in the webmaster tools Google correctly marked one of my pages as 404. Therefore, I started to study it. I have the "Add Trailing Slash Rule" rule. Google marks domain.com/page as 301 (in my opinion, correct) to domain.com/page/ . But he notices domain.com/page/ as 404. I think using the end slash rule as I have the right way, however, I have to do something else or use the forward slash redirection in the โrightโ way of doing things , even though Google sometimes wants to force me.