drupal.org path aliases ending with ".0" prevent Drupal point release announcements from being indexed by Google

christefano - June 15, 2008 - 07:34
Project:Drupal.org webmasters
Component:Site organization
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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

christefano - June 15, 2008 - 07:41

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

chx - June 17, 2008 - 04:10
Status:active» fixed

The blog you linked says

So just in the last day or so, we switched it so that Google is willing to crawl pages that end in in “.0″. This will help the small number of pages out on the web that want to serve up HTML pages with a “.0″ extension

. So this is fixed now.

#3

Gábor Hojtsy - June 17, 2008 - 11:23

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

Anonymous (not verified) - July 1, 2008 - 11:33
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.