[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Soft 404's

windows 2003, railo 3.1, apache, mysql 5.1

I submitted my sitemap, a cfm template that querys my property listings database and outputs the listing url's in xml format, so it stays updated, through google webmaster tools and a few days later checked in to find some crawl errors "soft 404" these were property listings in my database that we no longer active. I guess google had a look at the sitemap then actually crawled the url's the next day, otherwise the sitemap should be current as it is generated dynamically when called. My question is how can I stop these "soft 404" errors? and how can I use cfml to redirect to a page with a custom error message? right now if you hit one of these "soft 404" pages it is just a blank page that returns a 200 but should actually be a 404

Any help is greatly appreciated!
0
Bang-O-Matic
Asked:
Bang-O-Matic
1 Solution
 
dwkdCommented:
you can determine if it is still valid using cfhttp  
so send http request and based on the response redirect page
0
 
billfusionCommented:
The way I dealt with this exact problem was to display the property listing as inactive.  I then listed other properties that had similarities to the property in question.  If you no longer have access to that listing due to its removal from your database, you can generate a message mentioning that the listing is not longer available or active, then either give some contact info or list your search screen.

Since you're already generating a valid page (code 200), you must have some process handling your 404 errors and displaying the blank page.  That's where you need to insert code to handle the error per the discreption above.
0
 
Bang-O-MaticAuthor Commented:
"you can generate a message mentioning that the listing is not longer available or active, then either give some contact info or list your search screen." that sounds like the solution I want, but I'm not sure how to handle that.   I guess just query that listing:

<cfif myQuery.RecordCount is "0">"Property off the market"<cfelse> display the property

 I like your idea about displaying similar properties but I dont see how that would be possible?.. since my database is updated daily with only active listings.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now