Solved

Soft 404's

Posted on 2011-03-15
3
262 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now