Forum Moderators: phranque

Message Too Old, No Replies

Googlebot finding 302 Found When Crawling

Googlebot finding 302 Found When Crawling

         

benholland

6:14 am on Apr 15, 2016 (gmt 0)

10+ Year Member



When Googlebot crawls my site it is finding a 302 found page that shows the page has been redirected to itself. Using GSC fetch and render i found that this is the code it is seeing when it comes to my site. Users have no issues. Why is this happening and how do I stop it?


HTTP/1.1 200 OK
Date: Fri, 15 Apr 2016 05:58:29 GMT
Server: Apache
Vary: Accept-Encoding,User-Agent
Content-Type: text/html
Content-Length: 279
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://www.example.com/">here</a>.</p>
<hr>
<address>Apache Server at www.example.com Port 80</address>
</body></html>

[edited by: engine at 4:54 pm (utc) on Apr 15, 2016]
[edit reason] please use example.com [/edit]

lucy24

8:33 pm on Apr 15, 2016 (gmt 0)

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



the page has been redirected to itself

To itself, or to the with/without www version of itself? Before anything else, check your domain-name-canonicalization code-- wherever it may be-- and make sure it's got the proper 301.

Users have no issues.

They don't get redirected, or they don't notice they're being redirected?

not2easy

8:41 pm on Apr 15, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It looks like an improper SSL certificate setup, note the https and the "Port 80" part of it.

benholland

9:36 pm on Apr 15, 2016 (gmt 0)

10+ Year Member



@Lucy24 The URL for the page is exact same as the page it is getting redirect to. No https or www issues. The users get the correct page with everything on it. No noticeable redirect. I have not touched the page in a very long time and this started happening out of the blue. Everything had been working fine for years up until that point.

@not2easy I have had the ssl cert on there for over a year now, with no issues. What could be the issue? How do I resolve it?

Thanks for your help guys.

not2easy

11:02 pm on Apr 15, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Port 80 normally is configured to serve http connections and 443 is default for https that's why it seemed odd. It can be configured at the server level to use non-default ports, but it seems odd that the default for http would be selected to use for https. There are different kinds of certificates, so there is not a single right answer to what to do to fix it. You might want to ckeck some of the other threads in the Apache forum regarding setting up SSLs for different purposes.

Another possibility is that the [R=301,L] flag isn't in place. The default is 302 if 301 is not specified in your rules. Again, that is a question for the Apache forums: [webmasterworld.com...]

Andy Langton

11:08 pm on Apr 15, 2016 (gmt 0)

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



Vary: Accept-Encoding,User-Agent


What happens if you request the page with a Googlebot user-agent?

benholland

11:22 pm on Apr 15, 2016 (gmt 0)

10+ Year Member



Do you think I got hacked? When I called my hosting company they said that was probably what happened. The SSL hasn't changed and they said it was set up properly.

@Andy Google search console shows that when fetched the site has the code in my first comment.

lucy24

1:07 am on Apr 16, 2016 (gmt 0)

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



When I called my hosting company they said that was probably what happened.

Probably what happened? If SSL is involved, shouldn't they know exactly what's going on? Anything involving port numbers can only happen in the config file. Is this a VPS, or vanilla shared hosting?

If, as you say, you haven't touched the page in a long time, then any unexpected timestamps on the physical files should be glaringly obvious. When you FTP-or-equivalent into your site, does anything look "off"?

benholland

1:13 am on Apr 16, 2016 (gmt 0)

10+ Year Member



Not that I know of, what should I look for?

lucy24

2:52 am on Apr 16, 2016 (gmt 0)

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



what should I look for

For starters, verify that all timestamps agree with the last time you remember editing a given file. In particular, open your htaccess (or non-Apache equivalent) and make sure it says everything it's supposed to say and nothing it isn't.

Minor caution: Timestamps may come through in UTC. (I've never figured out whether this is a server setting, my FTP program, or both.) So if things seem to be happening several hours in the future, you'll need to subtract.