Forum Moderators: open

Message Too Old, No Replies

Google apache 301 issue beware

301 tip when hyperlinking directories with apache

         

kilonox

6:34 pm on Mar 27, 2003 (gmt 0)

10+ Year Member


I wish this was posted somewhere before, but it wasn't and I had to learn the hard way. I lost all my reciprocal/link rank on a PR5 site because my links to my link page were like this: http://www.superwebsite.com/links. Where links is the directory where my links page, index.htm, resides. Google would crawl to the link and wouldnt pull the direcotory index because when you link to directories in the way I did, apache returns a 301 to which redirects you from "GET /links HTTP/1.0", to "GET /links/ HTTP/1.0", and then the directory index. Google would not crawl past this point. It would stop at the 301 completely. I agree I should have just linked directly to the file from the start. Ouch.

-Karsten

twotasty

7:28 pm on Mar 27, 2003 (gmt 0)

10+ Year Member


I believe you are fine if you link using http://www.yoursite.com/directory/ .., make sure you have the ending slash. Then again I am guessing that is what you discovered the hard way.

canuck

7:45 pm on Mar 27, 2003 (gmt 0)

10+ Year Member



kilonox, thanks for the heads up! I noticed one of my links I just got from a PR7 webpage to one of my interior pages didn't have the final "/" on the directory... and sure enough my logs showed a 301.

Now to email them to kindly ask for the change...

- canuck

andreasfriedrich

7:51 pm on Mar 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is a good idea indeed to link to either a directory or an existing file but not to something that does not exist. Doing so has been good practice in HTML coding for years since it saves one request cycle.

Andreas

Birdman

7:59 pm on Mar 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, good call. I was just about to disagree after testing a few links on one of my sites. They returned 200 and they did not have the ending slash. Then, I realized that I got a 200 because I rewrite the urls.

But I did have one static index page that was also linked to without the ending slash and sure enough, 301. And just today I was wondering why it was the only section of the site that had pr3.

canuck

9:21 pm on Mar 27, 2003 (gmt 0)

10+ Year Member



Yeah, I always request the proper directory formating with the "/", however, not all webmasters put this in correctly. Just going through my links I've spotted another badly formated directory link to me.

I previously didn't worry about these errors by other webmasters linking to me since I considered them trivial... but thanks for the heads-up.

- canuck

Receptional Andy

9:41 pm on Mar 27, 2003 (gmt 0)



I thought 301s still gave PR because the move was permanent? Google recommends this if you move URL ( [google.com...] )

yosmc

9:46 pm on Mar 27, 2003 (gmt 0)

10+ Year Member



Is this a problem only with subdirectories, or does the same problem also apply to www.mysite.com vs. www.mysite.com/?

canuck

10:04 pm on Mar 27, 2003 (gmt 0)

10+ Year Member




Hrmm.. anyone have any evidence for or against this? I know it sends 2 requests to your server - the first one returns the 301 then the user is redirected to the content.

I would assume by Google's discussion of 301s that the PR would also be transferred. Thoughts?

- canuck

anallawalla

10:21 pm on Mar 27, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month


I used an .htaccess file at the old site which is a PR7 at the subdirectory level (root is PR6) with a single line:

Redirect 301/foo http://newsite.com/foo

(I want to retire the root domain and am moving my hobby pages to the new site)

Is the above wrong?

Kackle

10:22 pm on Mar 27, 2003 (gmt 0)



In my experience with a recent domain change, the 301 did not transfer PageRank at all.

It does not show up as a credit with the "link:" command either.

Worse yet, it takes months for a large site to see all of its deep pages purged from the old domain, even when they all spit out 301 the entire time.

About the www.mysite.com as opposed to www.mysite.com/ -- I tried it on Apache 1.3.9 and there is no 301 issued when the slash is missing on the root directory. Apache directly does a 200 in this case.

anallawalla

10:27 pm on Mar 27, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month


Re previous post:

Try again (the spaces got swallowed when posting, so denoted by ****)

Redirect 301 **** /foo **** http://newsite.com/foo

Receptional Andy

10:38 pm on Mar 27, 2003 (gmt 0)



>>In my experience with a recent domain change, the 301 did not transfer PageRank at all.
>>It does not show up as a credit with the "link:" command either.

I actually have the opposite experience in that both PR and link: commands update with the 301.

kilonox

6:28 pm on Mar 31, 2003 (gmt 0)

10+ Year Member



I'm running apache-ssl 1.3.19, and in my case it did post the 301. I agree that Google shouldn't penalize for it but for a long time (until I updated the link to avoid the 301) It would not crawl past it in my case. The span of time that it covered was from Jan12 of this year to March until I changed it. It just stopped at the 301 and never evisited to GET 200 the 301s real link.

-Karsten