Skip to Main Content
Amazon Hacks
book

Amazon Hacks

by Paul Bausch
August 2003
Intermediate to advanced content levelIntermediate to advanced
304 pages
7h 33m
English
O'Reilly Media, Inc.
Content preview from Amazon Hacks

Create Shorter URLs

Shortening a long Amazon URL is just a matter of knowing where to put the ASIN.

If you’ve ever tried to send a link to an Amazon product detail page to your friends via email, you know what a hassle those long Amazon URLs can be. Most email programs wrap the text at 72 characters and end up breaking the URL, often making it unusable. Next time, instead of copying and pasting the URL exactly as you see it, try cropping it a bit so the lines won’t wrap. Here’s what a URL copied directly from Amazon looks like:

http://www.amazon.com/exec/obidos/ASIN/0596004478/qid%3D1049157816/[RETURN]
sr%3D11-1/ref%3Dsr%5F11%5F1/104-2773718-4336742

For those of you keeping score at home, that’s 114 characters! The core piece we’re looking to dig out and preserve, the ASIN [Hack #1], is the only bit really needed to target the right product page. Everything after the 10-digit ASIN is garbage—session tracking and other bits and bobs used by Amazon—when we just want to link to the page. So we can instantly make a shorter link by removing the excess baggage:

http://www.amazon.com/exec/obidos/ASIN/0596004478/

That’s much better. We’re down to 50 characters, well within the non-wrap zone of most email clients. But if you really want to push the character-limit envelope, there’s a little-known way (contributed by Cyrus Durgin at Amazon) to shorten the URL even further. You can replace exec/obidos simply with o, as in:

http://amazon.com/o/ASIN/0596004478

That brings us down to 35 characters. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

Karen Renaud, Merrill Warkentin, George Westerman
Incident Metrics in SRE

Incident Metrics in SRE

Stepan Davidovic

Publisher Resources

ISBN: 0596005423Supplemental ContentCatalog PageErrata