3 ms·
Could a URL wrapper service follow a URL through its redirects only wrap the final address? I'm not a networking expert, but it seems viable enough to me. Shoo
by codyb 12y ago
Could a URL wrapper service follow a URL through its redirects only wrap the final address?
I'm not a networking expert, but it seems viable enough to me. Shoot out a GET request, wrap the final address with your shortener. Cut out the middlemen.
It's an idea. It might fail at scale. And might not be feasible.
- X-Istence 12y agoDownside is that if I use an URL shortening service that allows me to change where you are headed after the fact (for example after 1000 hits, go to a new page instead) then you've just broken that functionality.
- manicdee 12y agoThat's no longer a URL shortening service, that's a campaign redirection service. Just serve the appropriate content, rather than relying on redirects.
- X-Istence 12y agoExcept that my actual URL is much longer than the short one that I am using on Twitter, advertisements, T-Shirts and various other sources. Directly serving the content while possible is not what my client wants. They want to go from their short URL to the longer full domain one.
- bagels 12y agoYes, you do a HEAD request, and follow the redirects till you stop getting redirected. We do this to catch certain spam urls.
- userbinator 12y agoA lot of shorteners don't just use regular HTTP redirects, they use Javascript or meta tags. To find the actual destination, the server would at the very least have to detect and parse HTML, and maybe even execute Javascript.