?q parameter

I just discovered an unfortunate function in Drupal 5.x (Drupal 5.20) which creates multiple content in Google.

http://www.example.com/?q=Drupal

Where Drupal is an url alias.

http://www.example.com/Drupal
&
http://www.example.com/?q=Drupal
are offcourse the same but google catches both and indexes them.

adding Disallow: /?q= to robots.txt wil block these multiple urls.

Login to post comments

That's normal

Michelle - Tue, 2009-09-22 12:38

The q parameter is the normal URL. The other is an alias created by turning on clearn URLs. Unless you link to the q version, Google won't know about it. You can fix this using the Global Redirect module as well.

Michelle

-- Sig --
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)


I have used clean urls since 2005

FlemmingLeer - Tue, 2009-09-22 15:08

Hi Michelle,

On that particular site I have been using clean urls since it's origin in 2005 and yet google still caught these q parameter urls for most recent node urls as well as taxonomy clean urls made after 2005.

I also use the global redirect module as well.

So I don't know where google got the q parameter urls from. :/

Even a turtle reaches it´s goal...


Also the same behavior in Drupal 6.x

FlemmingLeer - Fri, 2009-09-25 09:37

The same behavior is also in Drupal 6.20

Even a turtle reaches it´s goal...


globalredirect

greggles's picture
greggles - Sat, 2009-09-26 16:51

Surely you've seen Global Redirect which fixes this problem.


No, it did not

FlemmingLeer - Sun, 2009-10-04 09:19

Hi Greggles,

No, it did not.

I have been using Global redirect for a long time now and currently am using Global redirect 5.x-1.5 with
Non-clean to Clean option turned on.

I just enabled Remove Trailing Zero Argument in global redirect and now the ?q argument ulr redirects correctly to the url alias.

I will report it as a bug.

Even a turtle reaches it´s goal...


You are linking to these

s.Daniel's picture
s.Daniel - Sat, 2009-10-17 12:31

You are linking to these urls, otherwise google wouldn't pick them up. Id use xenu link sleuth to find where these links come from and then change them. Using global redirect is good too but avoiding the wrong links and 301s is better.