开发者

Using URL shortening service

I am trying to use URL shortening service in my app. However, I want to expose my custom tinyURL domain rather than the one of the services. For this, I've done the following:

  1. I shorten my long URLS from a stardard tinyURL service and get a shortened URL like - http://tinyurl.com/abcdXYZ

  2. I expose the url as http:// kk.ly/abcdXYZ (Assuming kk.ly is the domain that I own)

I also do a CNAME forwarding from kk.ly to tinyurl.com

I wanted to know if t开发者_高级运维here are any gotchas with this approach? Has anybody attempted this before - any experiences/learnings to be shared?

Thanks, KK


The CNAME means that the connection will be redirected to tinyurl.com, but the URL in the HTTP request will sill feature the kk.ly hostname rather than tinyurl.com. I do not know if the HTTP server at tinyurl.com will take offense. Also, the people managing tinyurl.com may themselves feel offended (basically, you are using their service without keeping their name in the URL). I suggest that you check beforehand.


Just 'cause you can setup a cname and redirect traffic to tinyurl.com doesn't mean they'll actually service the requests. Try taking a working tinyurl.com url and replacing the domain name with their IP address and you get a 404 error. A custom cname would probably result in the same.

Google's Short Sites service specifically supports custom cnames, but it is only available for Google Apps.

http://www.labnol.org/internet/setup-tinyurl-like-redirection-service/8333/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜