Search Engines not respecting CFLOCATION?

Mar 07, 2009
I've been seeing some wierd behaviour from a local search engine on one of my sites; I say local, as it's a Google Search Appliance designed to trawl the ox.ac.uk domain. What I can't understand is what it doesn't seem to respect CFLOCATION's default redirect. BlogCFC uses CFLOCATION quite a lot, especially when URL variables don't exist, which is where I'm seeing this the most: Let's say I have a page which has: "foo"> "index.cfm" addtoken="no"> Which tells the browser to essentially go away unless url.foo equals "foo". Let's say that I've got some code in the remainder of the page that relies on url.foo - it then throws an error which I get by email. I've been seeing these errors, ONLY triggered by this GSA, which could only have happened had the page been resolved; I understand this is a 302 redirect, not a 301 redirect, but shouldn't the GSA respect the browser command of redirect and stop rendering the page? This isn't an error a human can throw! Why only this one GSA? Could it be a configuration issue? I'm going to try adding a cfheader to change it to a 301 redirect and see what happens... Any ideas welcomed...

Comments

Daver

Daver wrote on 03/07/09 11:52 PM

In the CFLocation add the statuscode so that it is statuscode="301". Ive never checked to confirm your comment that it gives a 302 but Id guess that it gives a 200 or 302 status code both of which are bad. If a search engine sees a 302, it will keep coming back for as long as you show it that.

Think of it as a guy that keeps asking a woman out and is never told NEVER but is instead told, oh im busy, not today. The guy thinks there is a chance and will continue to try until he is redirected to get lost.
Tom K

Tom K wrote on 03/08/09 12:10 AM

Yeah, you definitely get :
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=UTF-8
location: /your_redirection_page.cfm
Connection: close

According to firebug. So it seems I should be doing 301's by default in this case.

What I don't get is why this one GSA continues to render the page!
Azadi Saryev

Azadi Saryev wrote on 03/08/09 11:43 AM

have you tried adding <cfabort> after <cflocation>?

btw, the code sample in your post actually tells the browser to go away IF url.foo equals "foo", not the other way as mentioned in the post...

Azadi
Tom K

Tom K wrote on 03/08/09 11:49 AM

Sorry yes, the code example was just a quick concept :)

No I've not tried addeding cfabort after the cflocation yet..I'm trying to avoid going through and changing all the cflocations I've got :)

Write your comment



(it will not be displayed)