Forum Moderators: coopster

Message Too Old, No Replies

How to handle a random link generator

So the search engines don't get angry

         

Musicarl

3:40 pm on May 17, 2008 (gmt 0)

10+ Year Member



We have some code that generates a random link to an item in our database. When someone clicks:
www.example.com/random.php

It generates a random identifier in our products database and sends the user to that product page. Something like:
www.example.com/page.php?id=2459

Since the search engines are going to see random.php as a different link every time they spider it, what's the best way to let them know we're not doing anything shady?

Receptional Andy

3:48 pm on May 17, 2008 (gmt 0)



I'd say the best two options would be to either use rel="nofollow" on the random link itself, or alternatively disallow crawling of /random.php via robots exclusion (I'd use the latter since you can't control all links to the randomiser).

I don't think there's a suitable redirection status for randomised links. IMO either a permanent or temporary redirect status would invite confusion, although a permanent redirect might make some sense.

Musicarl

6:37 pm on May 18, 2008 (gmt 0)

10+ Year Member



Thanks Andy. We'll put in the disallow in our robots.txt.