Forum Moderators: DixonJones

Message Too Old, No Replies

How to tell if a visit is from a HTTP 302 redirect?

         

tntpower

8:08 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



Can I? Thanks

Some guys use http 302 redirect to redirect their visitors to my site. Worst of them, some of those pages rank higher than my in search engines. Crazy. So I want to set a HTTP 404 or 500 error page for those from redirecting. By doing so, I think search engines will know the redirect URL is bad link so will remove it.

nancyb

10:00 pm on Mar 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you might want to check out these threads for a lot of info about 302 redirects and what can and cannot be done about it. Especially, see the second thread since you are planning to use a 404 or 500.

302 Redirects continues to be an issue [webmasterworld.com]

How to Remove Hijacker Page Using Google Removal Tool [webmasterworld.com]

larryhatch

10:06 pm on Mar 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A Simple question: Yes or no.

Can I tell from my access_log files which sites are linking to mine
with a 302 redirect? Does that show? - Larry

larryhatch

2:27 pm on Mar 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<anyone?> I just want to know if 302 redirects show as such in
the access_logs or not. I see 301s, lots of 304s, but no 302s at all.
If this is good news, I'd like to know it. Thanks - Larry

larryn

9:52 pm on Mar 19, 2005 (gmt 0)

10+ Year Member



Larry,

You won't see the other site's 302 in your log. Your log can only capture what happens on your site, and what if volunteered by your visitor's browser.

Your log might catch their referrer, but not that it was a 302 from the referring site, and I'd bet that the referrer value is browser dependent. Give me a day or two and I'll see what I can try here on my site.

Larry

larryhatch

9:04 pm on Mar 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks LarryN:

I DO see 301s and 304s. 304s make me really curious.
How on earth does my host ISP know whether a visitor has
already seen my page? I take it that's what the 304 means. -Larry H

larryn

3:01 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



Larry H,

I'd regret to inform you that your ISP is clueless in this matter. As you pointed out, it is difficult for it to know if a visitor has seen a page.

However, the browser knows when it last requested a file in its cache, and when it re-requests that same file instead of just asking for the URL, it actually says "Hey, if this file has been updated since #*$!, give it to me, otherwise just let me know my current copy is still good" - That later case is the '304'.

Hope that helps,

Larry N

idoc

7:52 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



A 304 means that the url was delivered to the requestor from cached content. In other words the visitor has been there before and the page had not changed since. That saves both your server and the requestor bandwidth. Your server generates the 304 reply based on the request.

Likewise your server generates the 301's that you see in the logs such as from www.yoursite .com/folder to www.yoursite .com/folder.index.html.

Neither the redirectors or bots return referrer information... so the request www.yoursite .com/folder.index.html or www.theirsite .com/go2php?/www.yoursite .com/folder.index.html will look the same either way to you on your server logs as your server will return the the page code 200, a 304 cached page or a 403 or 404 error etc.

larryhatch

10:25 pm on Mar 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the replies guys.

I take it that there's no way to see 302s on my access_log files.

A 302 would be returned as a 200, 304 or other number as applicable,
most likely a 200. That's a real shame.

If everyone could easily see incoming 302 redirects, they would be
much more inclined to do something about it. Not everyone is likely
to jump thru hoops to find out if they are being victimized. -Larry

larryn

10:44 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



Larry,

I don't quite follow your thoughts on server return status 302 - Moved Temporarily; Your access log should log any requests to your server, you would have to generate the moved temporarily location header with that status of 302, and your server should log that request and response.

If fact some servers used to respond with a 302 if an incomplete path "http://www.xyz.com" instead of "http://www.xys.com/" was requested. But those days are long gone...

Larry N

idoc

10:49 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



Keep in mind in this scenario, it is not larryhatch's server that is generating the 302 but the redirecting site. His server will just see it as any other get request provided no referrer information is passed by the requestor. Similiar idea as if the requestor's browser is using some of the privacy software we are seeing now... we get no referrer information in the logs.

larryn

12:14 am on Mar 22, 2005 (gmt 0)

10+ Year Member



idoc,

Agreed, any activity on any other server won't be in the destination server (Larry H's) log, and the referral information is provided at the grace of the visitors browser/firewall.

Larry N