drupal.org path aliases ending with ".0" prevent Drupal point release announcements from being indexed by Google
| Project: | Drupal.org webmasters |
| Component: | Site organization |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
It turns out that Google treats file extensions like ".0" as files and won't index pages found at addresses ending with that extension. I think we need to use different paths in the future when announcing major point releases (for example, drupal-7).
This already affects the Drupal 5.0 and 6.0 release announcements. They're not in the Google index. We can address this by manually changing the path aliases for the announcements so that they don't end with ".0" (e.g. drupal-6) and then use something like this to redirect old links:
RewriteCond %{HTTP_HOST} ^(www.)?drupal\.org$ [NC]
# remove trailing .0 and redirect
RewriteRule ^(.+).0$ http://%{HTTP_HOST}/$1 [R=301,L]Alternatively, we can add trailing slashes (so that the path aliases don't need to be updated) by using something like:
# check to see if path ends with a slash
RewriteCond %{REQUEST_URI}!/$
# check to see if path ends with .0
RewriteCond %{REQUEST_URI} \.0
# add trailing slash and redirect
RewriteRule ^(.*) /$1/ [R=301,L] My preference is for the first option. The Drupal point release announcements (for example, the Drupal 5.0 and 6.0 announcements) are a pretty big deal and now that the world knows about forbidden file extensions
it doesn't make any sense to deliberately prevent Google from indexing those announcements.
#1
I should mention that the Apache rewrite stuff is meant to illustrate my point but was written off the top of my head. By some miracle it may actually work :) but it hasn't been tested.
#2
The blog you linked says
. So this is fixed now.
#3
Yay, verified! I tried to search for "Drupal 6.0 released" when the issue was reported, and the announcement was nowhere to be found in the results. Now searching for the same brings up the announcement first place. Great!
#4
Automatically closed -- issue fixed for two weeks with no activity.