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

Is there a way to "intercept" incoming traffic from a QR code and redirect it to another page of your site?

I have a QR code that is printed on physical paper. The scan will take the visitor to my root homepage, ie- www.mysite.com

However, the URL I need visitors to goto is www.mysite.com/code

Any way to do this without having to generate a new code? I don't want to have to reprint the physical copies!

share|improve this question
up vote 4 down vote accepted

You'd have to reprint the code, most QR readers launch the phone's browser so there is nothing for you to detect on the web front end to redirect the incoming link.


  1. Reprint the material
  2. Print stickers and literally sticker over the code (pain but we've all had to do it at some point)
  3. Redirect all mobile traffic to /code/ until you can reprint the material.

Option 3 probably the best one for you right now.

In the future it's best to use url obfuscation for QR codes on printed material, at least this means that you can redirect as needed after the print run.

share|improve this answer

Probably not. It is likely that the QR code simply encodes the URL. There is not likely to be any further information contained in it that would enable you to detect that the referral came from a QR code, and the User-Agent: string is likely to be that of the web browser that the URL was passed to rather than the QR code scanner program.

See also http://stackoverflow.com/questions/8740886/detect-if-webpage-is-opened-inside-qr-code-reader-app

share|improve this answer
I agree with Christi... it looks like you may have to reprint as I don't believe there is any extra information included. – Vince Pettit Mar 1 '12 at 9:12

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.