Forum Moderators: Robert Charlton & goodroi
>Google warns about mass redirecting old pages to the root home page. It's rarely a good idea. <
REALLY? I must have missed that one or misunderstood it. Now they tell me :). If you find a link to the actual G mention I would love to read it in context.
should I be 301ing them to "http://www.domainb.com" or "http://www.domainb.com/index.htm"? or doesn't it matter?)
www.example.com is the hostname with no page specified. / or /index.html (or /index.php etc) and / (the shortest) is best. www.example.com/ "GET / HTTP/1.1" when users click a link to href="http://www.example.com" is the browser being helpful. href="http://www.example.com/" instead. href="/" to link back to the root. Linking to href="" would not work. # Redirect index requests
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(php|html?)
RewriteRule ^(([^/]+/)*)index\.(php|html?) http://www.example.com/$1 [R=301,L] Read the discussion on the linked thread and it sounds like no firm decision one way or the other was agreed upon there.
Phantoms don't show up in site:example.com, but if you search for "domaina.com", "www.domaina.com" or "domaina.com/abc.htm", they show up with an excerpt from the domainb.com home page but with "domaina.com", "www.domaina.com" or "domaina.com/abc.htm" as their URL.
If you find a link to the actual G mention I would love to read it in context.
A soft 404 is when a web server returns a response code other than 404 (or 410) for a URL that doesn't exist. A common example is when a site owner wants to return a pretty 404 page with helpful information for his users, and thinks that in order to serve content to users he has to return a 200 response code. Not so! You can return a 404 response code while serving whatever content you want. Another example is when a site redirects any unknown URLs to their homepage instead of returning 404s. Both of these cases can have negative effects on our understanding and indexing of your site, so we recommend making sure your server returns the proper response codes for nonexistent content. Keep in mind that just because a page says "404 Not Found," doesn't mean it's actually returning a 404 HTTP response code—use the Fetch as Googlebot feature in Webmaster Tools to double-check.
Do 404s hurt my site? [googlewebmastercentral.blogspot.com]
[edited by: Robert_Charlton at 11:02 pm (utc) on Dec 18, 2011]
[edit reason] delinked example domains [/edit]
We have the same problem, except they were redirected over a year ago, went away, and now they've been back for months (with the content of the home page, just like the other poster). And we're getting a serious duplication penalty from it because they are pointing to our home page.
Hmm, I thought it is pretty clear that mass redirecting to home page is a bad idea
A soft 404 is when a web server returns a response code other than 404 (or 410) for a URL that doesn't exist. A common example is when a site owner wants to return a pretty 404 page with helpful information for his users, and thinks that in order to serve content to users he has to return a 200 response code.
[edited by: Robert_Charlton at 10:51 pm (utc) on Dec 18, 2011]
[edit reason] delinked examples and fixed formatting [/edit]
I'm not real clear on ReWrite code syntax. In your code:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(php|html?)
RewriteRule ^(([^/]+/)*)index\.(php|html?) http://www.example.com/$1 [R=301,L]
which I assume goes in .htaccess on domaina, is "example.com" supposed to be domaina.com or domainb.com?
If it is domainb.com, then this is supposed to do the actual redirection of the home page all by itself?
currently I am doing simply:
ReWriteCond %(HTTP_HOST) !www.example.com
ReWriteRule (.*) http://www.example.com/$1 [R=301,L]
Redirect 301 /index.html http://www.example.com/
Redirect 301 /index.htm http://www.example.com/
Redirect 301 /abc.htm http://www.example.com/
(and a bunch other 301s)
If I were to "Redirect 301 / http://www.example.com/ that redirects EVERYTHING, no?
Perhaps this is why example.com and example.com/ are getting indexed, even though everything redirects browsers?
BTW, I found the same code as you posted above, elsewhere, written the same but with *'s in place of the +'s are you sure this is correct?
[edited by: Robert_Charlton at 10:56 pm (utc) on Dec 18, 2011]
Google warns about mass redirecting old pages to the root home page. It's rarely a good idea.