I have an URL domain.com/random, which will redirect to a random page.

What would be the correct HTTP code for this?

Plus, I'm inserting the link like this:

<a href="/random" rel="nofollow" title="Random profile">Show random profile</a>

Spiders won't follow that link. Do I need to care about what HTTP code I send?


I don't think you should send an HTTP code (apart from the usual 200). Spiders may or may not follow that link. If they do follow it they may decide to give it lesser weight, but still pay attention to it. The 301/302 redirects say "what used to be here is now somewhere else", but there was never anything at your random link in the first place. Even if there was, because you send them to a random place it's not true that whatever was there is somewhere else, because it's always somewhere different.

  • Yes, now that you say this, it makes more sense to just use 200. – rlcabral May 16 '11 at 11:30
  • 301 is definitely incorrect, though; it's considered a cache-able redirect, which is not what you want. Arguably, 303 would be the best option given what you've described here, but 302 is a more common choice. – BMDan May 16 '11 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.