Solved

Soft 404's

Posted on 2011-03-15
3
264 Views
Last Modified: 2012-05-11
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
Comment
Question by:Bang-O-Matic
3 Comments
 
LVL 4

Expert Comment

by:dwkd
ID: 35143369
you can determine if it is still valid using cfhttp  
so send http request and based on the response redirect page
0
 
LVL 6

Accepted Solution

by:
billfusion earned 500 total points
ID: 35144009
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
 

Author Comment

by:Bang-O-Matic
ID: 35175450
"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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cfchart issue with html 6 143
Coldfusion session variables in scheduled job 1 356
How can I use EncodeForURL() in ColdFusion with CFGRID 5 56
REGEX HELP 11 49
Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question