Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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