Specific 301 Redirect Question

Posted By: hlt1 ()
Posted On: 2008-Jan-19 23:16

As we all know you can have a path:

http://www.domain.com/subdirectory/

And you can have the path:

http://www.domain.com/subdirectory/index.htm

Google usually links to the one without the filename.
Sometimes it links to the one with the filename.

Does this mean a properly created 301 redirect would NEED to have both covered?

For example:

Redirect 301 /subdirectory/ http://www.domain.com/newsub/
Redirect 301 /subdirectory/index.htm http://www.domain.com/newsub/index.php


Posted By: Quadrille ()
Posted On: 2008-Jan-19 23:27

It's better to use domain.com/ in all internal links (use find and replace), because most EXTERNAL links will - and that's why Google indexes it. In fact never use 'index' in links at all, unless you have to!

The last thing you want is both - that means two urls sharing the ranking - you want ONE with 100%!

Plus, of course always use www.domain.com and not domain.com (or vice versa) or you'll also damage your listings. Use a 301 for that.


Posted By: hlt1 ()
Posted On: 2008-Jan-20 05:24

Im sorry, did you even address my question???

Im asking about what to do after the fact. Google currently has both in its index.

It does not however do what you say it does. Rank the same page twice. It seems to strip the index.htm out even if its there. I guess this means i dont need the index.htm in the 301 file.

[ Message was edited by: hlt1 01/19/2008 10:23 pm ]




Posted By: Quadrille ()
Posted On: 2008-Jan-20 09:54

Sorry, this was what I was addressing:
"Does this mean a properly created 301 redirect would NEED to have both covered?"

That looked like a question. I regret I don't understand your supplementary response, so I cannot help you.


Posted By: g1smd (Staff)
Posted On: 2008-Jan-20 18:01

You should not have both "/" and "index.html" and "index.php" open to indexing. That is Duplicate Content. You should redirect "index.htm" to "/" and redirect "index.php" to "/" too. Those redirects fix an error you may have otherwise previously made by leaving both open to indexing.

However, your redirect example is wrong in several ways.

If you are redirecting "index.html" to "/", then you would never need to redirect "index.htm" to "index.php".

All of them should be redirected to "/", and NOT in a chain.

I also would not use "Redirect 301 ..." which is in the Mod_Alias functions, but instead would use a RewriteRule which is a part of the Mod_Rewrite functions. This has an effect on the order that your directives are processed.