Forum Moderators: open

Message Too Old, No Replies

Crawlers and HTTP Header for 301 Redirect

HTTP Header value differences

         

JohnK

1:37 am on Aug 11, 2004 (gmt 0)

10+ Year Member



I'm currently looking into adding the 301 redirect on our site. After looking into the forums, everyone has seen what I saw and that's IIS returns 301 Error. Everyone has said the crawlers only look at the status code. However; I've seen differences in the HTTP header returned by IIS and that returned by the ASP redirect.

Can anyone tell me whether that matters to the crawlers? Or do they absolutely only care about the status code?

Appreciate your help..

John

pageoneresults

2:14 am on Aug 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello JohnK, Welcome to WebmasterWorld!

However; I've seen differences in the HTTP header returned by IIS and that returned by the ASP redirect.

What types of differences are you referring to? The spider is going to react based on the server headers. If a 301 is being returned from the server, then the spider is supposed to follow the Permanent Redirect and update its index to reflect the target URI.

diamondgrl

2:27 am on Aug 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i think the status code matters. i had problems with redirect just this weekend on iis, although with php, not asp.

if i understand your problem correctly, asp will actually return a 200 if you create a custom error page. what i did is to erase the file altogether, then for my custom 404 page i had a perl script that returned a 301 code if the url passed throught the QUERY_STRING environmental variable (which contains the URL the user intended to go to) was one of the ones i needed to 301, as opposed to a random mistyping of another url, which deserved a 404.

it was all very convoluted but the only way i figured around the problem of iis returning the wrong error codes.

JohnK

2:59 pm on Aug 11, 2004 (gmt 0)

10+ Year Member



The differences I'm seeing are the following. There are some additional properties in the header. Depending on what we do.

IIS
HTTP/1.1 301 Error
Location: [localhost...]
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 166

ASP Response.AddHeader used
HTTP/1.1 301 Error
Server: Microsoft-IIS/5.0
Date: Tue, 10 Aug 2004 21:26:38 GMT
X-Powered-By: ASP.NET
Location: [localhost...]
Content-Length: 0
Content-Type: text/html
Cache-control: private

ASP Response.Redirect only
HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.0
Date: Tue, 10 Aug 2004 21:11:39 GMT
X-Powered-By: ASP.NET
Location: [localhost...]
Content-Length: 121
Content-Type: text/html
Set-Cookie: ASPSESSIONIDSQASQTDS=IIKNGMJAOFGGGDEELMMONHGG; path=/
Cache-control: private