• Skip to primary navigation
  • Skip to main content

Blair Williams

Everything is an Experiment

  • Home
  • WordPress Plugins
    • MemberPress
    • Easy Affiliate
    • Pretty Links
    • ThirstyAffiliates
  • Contact
  • About

Don’t Use TinyURL – Create and Track Links from your WordPress Website

by Blair Williams · Mar 29, 2009

A few weeks ago I started getting frustrated because I had to go into my apache config file every time I wanted to add a redirect link. I stopped using BudURL and TinyURL some time ago because my users have started to realize that they're being tracked whenever they see a link from one of these services. I've talked with several other Affiliate marketers and they've been saying the same thing, “don't put a tinyurl on your site.” Affiliates are always concerned with masking their URLs and with tracking so these link shrinking services seemed perfect for them… well, now users have caught on.

Last week, I started working on my own replacement for TinyURL, a WordPress plugin named “Pretty Link.” The thing that's great about this plugin is that I can now generate ultra small urls that redirect wherever I want and hang off of my domain name! I'm also able to track clicks on these URLs and in future releases of this plugin more stats than just clicks in future upgrades.

I just released this plugin tonight and can be downloaded from the WordPress plugin directory here:

https://blairwilliams.com/download

Filed Under: Plugins, Software Tagged With: blog, link, pretty-link, projects, redirect, shortcut, shrink, Software, tinyurl, url, website, Wordpress

Reader Interactions

Comments

  1. Kevin says

    March 30, 2009 at 1:50 pm

    Dood, this sounds AWESOME! Just what we need. Especially when everyone is becoming paranoid about being tracked on the internet or eating tainted peanut butter or being caught in some kind of evil twin storyline on their favorite television show.
    WORD!

  2. Daniel Richard says

    April 5, 2009 at 10:41 am

    Oh gosh. I’m facing one problem right now. As in the link doesn’t redirect (I’m using it for the right sidebar’s image ad).

    • Blair Williams says

      April 5, 2009 at 10:51 am

      Can you tell me more about what your webhost is using to host wordpress? Do they have mod rewrite installed? Are you using custom permalinks (see my installation instructions)? We can narrow the issue down from there…

    • Blair Williams says

      April 5, 2009 at 12:16 pm

      Daniel, Okay, I went to your site — it looks like redirect is working .. It looks like the tracking script is erroring out. Do you have access to your apache error log for this site? If so, we can see why it’s erroring and hopefully I can get a fix out there for it…

  3. chris says

    April 10, 2009 at 4:34 pm

    Hi – cool plugin you made, will come in real handy.

    I am trying to get it up and working on a new site I am building but I keep getting an error when the link is tried of:

    Warning: require(./wordpress/wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /****/******/public_html/wordpress/index.php on line 17

    Fatal error: require() [function.require]: Failed opening required ‘./wordpress/wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /****/******/public_html/wordpress/index.php on line 17

    If I simply change the link to something like http://www.yahoo.com (no pretty link on image) a link works fine.

    WordPress is installed in /wordpress versus the root directory. I think this is the issue where its having trouble even though I have recoded the index.php so it works properly. I have redone the permalink to not the default, and have tried deactivating then reactivating the plugin to see if that fixed the issue. I am on 2.7.1 WP version.

    Thanks for any guidance you might give, this is my first time trying to use the plugin, so I am sure its something I have done wrong.

    Chris

    • Blair Williams says

      April 11, 2009 at 7:12 pm

      Chris, I’m actually not sure what your issue is. Are you saying that you had a pretty link setup that was not working properly (you got those error messages) but then changed the pretty link‘s target URL to http://www.yahoo.com and it worked fine? Give me some more details as to what you are doing so I can re-create the issue.

  4. chris says

    April 13, 2009 at 12:51 pm

    Sorry for the lack of clarity. I made a pretty link but when you click it you get that error. I messed around with the .htaccess (copied it from another directory) a bit and got it to not give that error, but then the pretty link does not work, it simply just redirects to an internal page. All normal links obviously work fine. I think the issue is wordpress is not in the root directory. The link actually shows up in the browser window (whatever the actual masking I created) – just the redirect was causing that error.

    I have another blog I tried it on, http://www.credit-problems-gone.com. WP is 2.7.1 version, when I enable pretty links I go to add a pretty link, no matter what I do it never creates the link. It simply comes back to the configuration screen with nothing listed. I have changed the permalinks structure to not default etc.
    This blog too is setup as http://www.credit-problems-gone/wordpress/

    I am sure I am doing something wrong, if you have any insight I would appreciate the help.

    • Blair Williams says

      April 16, 2009 at 1:52 pm

      Chris, Try to update pretty link to the latest version, manually rebuild your links and let me know how it goes for you.

  5. chris says

    April 13, 2009 at 1:23 pm

    Oh I forgot to add, all these I tried it on are on the same server, and the credit site is using an affiliate wordpress theme, the other site is not, perhaps that could that be interfering with pretty link (on the credit site)? If you need more details, email me and I will give exact, I would rather not post it in the forum.

  6. Peter says

    April 21, 2009 at 4:19 pm

    I’ve added the pugin but I don’t see how to get it to work. My links are still like this http://woodstock-tell-a-vision.com/?p=1

  7. Mea Culpa says

    April 21, 2009 at 7:23 pm

    Hi, I just tested your plugin. I was looking for this kind of plugin for a long time! But unfortunately it is not quite usable. This is especially the case when it comes to supporting multiple blogs on a single domain.

    My main WordPress installation e.g. is not located in the root directory for security reasons but the blog itself is accesible directly via the domain name. However, “Pretty Link” does not understand that and adds the subdirectory WordPress is installed in to every pretty link – which is not really pretty at all.

    And additionally the “Options” link on the link management page is wrong as well as it does not include the subdirectory WordPress is located in and thus leads to the 404 error page.

  8. Blair Williams says

    April 21, 2009 at 7:33 pm

    @Peter
    You have to select a different Permalink structure other than “Default” for Pretty Link to work. I go into more detail in the Installation instructions on this page: https://blairwilliams.com/download

  9. Blair Williams says

    April 21, 2009 at 7:40 pm

    @Mea Culpa
    You’re absolutely right about the Options button — that’s a definite bug. I’ll have that fixed in the next release — for now though, you can go to “Settings -> Pretty Link” in your WordPress admin. As for your other issue — there is really no way for Pretty Link to create links outside of your WordPress install’s root directory. About the only way you could fix this would be to add some Apache rewrite rules in an .htaccess folder in the root of your directory to redirect specific pretty links. This is a limitation with WordPress — not with the Plugin. One way around this would be to use WordPress MU to manage all of your blogs. Although I haven’t tested my plugin with WordPress MU yet, you could have multiple blogs on the same domain and create “Pretty Links” from the root of your domain. Another possibility would be to put a separate WordPress instance on the root of your domain that would be there specifically for setting up Pretty Links … just a few ideas. I hope that helps.

  10. kevin says

    May 17, 2009 at 8:08 am

    Great job, Blair – thanks for this excellent little tool – it works like a charm!

  11. adam says

    August 23, 2010 at 2:04 pm

    Super strona o spedycji i transporcie.

  12. scholarshipbay says

    August 30, 2010 at 1:36 pm

    Nice work sure i will use it in my wordpress sites

Trackbacks

  1. Pretty Link 又一款WordPress短网址插件 - 走点路 | Showfom's Blog says:
    January 20, 2010 at 9:05 am

    […] Pretty Link 又一款WordPress短网址插件 Posted in WordPresson 2009/4/23 | 22 Comments cpro_client='y5ucn_cpr'; cpro_at='text_image'; cpro_161=2; cpro_flush=4; cpro_w=460; cpro_h=60; cpro_template='text_default_460_60'; cpro_cbd='#999999'; cpro_cbg='#FFFFFF'; cpro_ctitle='#000000'; cpro_cdesc='#444444'; cpro_curl='#008000'; cpro_cflush='#e10900'; cpro_uap=1; cpro_cad=1; 今天才看到的,和上次提到过的 WordPress ShortUrl Plugin 类似,更酷的是,这款插件可以自定义URL,当然,前提是不能和已经存在的或者已经在使用的 %postname% 相同,嘿嘿,这款插件名字叫做 Pretty Link ,嗯,作者介绍得很详细。感觉作者有点王婆卖瓜的味道,还写了一篇日志:《不要使用TinyURL,用WordPress创建自己的短网址网站》,嗯,这款插件的独到之处, WordPress ShortUrl Plugin 只能做一些简单的转向,而且URL是数字的,而 Pretty Link 不仅可以做到这些,还能在后台查看统计、导出数据等等,呵呵,确实不错。在我感觉里,其实 WP-DownloadManager 之类的下载插件也可以做到,至于大家喜欢哪种形式的,就是青菜萝卜各有所爱了。作者介绍:https://blairwilliams.com/pretty-link/插件下载:http://wordpress.org/extend/plugins/pretty-link/演示:https://blairwilliams.com/zq0https://blairwilliams.com/aweber嗯,确实不错,有兴趣的同学自己去试试吧,感觉我是没什么必要用这个插件了,嘿嘿。用独立的源程序就OK~相关信息本文短网址:http://aa.cx/lf , 如果你觉得本文很可爱,请使用 Twitter 来分享本文:Tweet This收藏+分享: Delicious / Live Favorites / Google书签 / 百度搜藏 / QQ书签 / 饭否 / 豆瓣 / Twitter相关文章AA.CX 短网址 WordPress 插件 (98)使用 Yourls 强化你的短网址系统 (56)MobilePress 主题汉化并修改 (62)WordPress 评论群发器?操你大爷的! (166)WordPress 显示留言者信息插件 – Comment Info Detector (239)uLShort – 免费开源功能强大的短网址程序 (74)千里之堤溃于蚁穴 – 慎用 WordPress 插件 (134)WordPress 精简版评论文明用语插件 (107)我使用的 WordPress 插件 (90)升级到 WordPress 2.8 以后要注意的事项 (61)已有22条评论 月夜 发表于2009年04月23日18:24你最近的两篇这个专题的文章搞的以后都不需要再寻找段网址的服务了。。太强大了。。呵呵。。[回复]Showfom 回复:April 23rd, 2009 at 19:02@月夜, 额……本人四年前就研究过网址转向,下次来篇笼统地说一下哈哈。 [回复] 老N 发表于2009年04月23日18:44觉得如果自己的域名的话太长了。。。[回复]Showfom 回复:April 23rd, 2009 at 19:01@老N, 额 我有个域名37y.cn,倒是有这方面的想法来着……[回复]老N 回复:April 23rd, 2009 at 19:16@Showfom, 这个域名不错啊,做短址很理想。[回复]Showfom 回复:April 23rd, 2009 at 19:19@老N, 然后再集成到wp里哈哈哈[回复]Yacca 回复:April 24th, 2009 at 21:11@老N, 我eemir3都还在用呢[回复]Showfom 回复:April 24th, 2009 at 23:15@Yacca, 对了,为啥叫做eemir3[回复] 三脚猫 发表于2009年04月23日21:59不错,真实用。[回复] 胡戈戈 发表于2009年04月23日22:44没怎么用,一般好像有gtalk机器人的[回复]Showfom 回复:April 24th, 2009 at 11:59@胡戈戈, 额……还真没注意过,不过这样很不错。直接发个网址给Gtalk机器人,哈哈。 [回复] 篮球博客 发表于2009年04月24日13:33我很少用插件。。后台就几个哈[回复]Showfom 回复:April 24th, 2009 at 17:14@篮球博客, 其实……我就用了一个防止垃圾评论的插件,其他的插件都可以集成在主题里 当然是骗你的。[回复] Lorz 发表于2009年04月29日20:43被你这底部的图片雷到了…… 这 Pretty link 天天都更新。我已经很久没启用它了[回复]Showfom 回复:April 30th, 2009 at 13:17@Lorz, 那就表用呗[回复] Sivan 发表于2009年05月1日19:59 还有一款独立程序,getshorty。我正在用。[回复]Showfom 回复:May 1st, 2009 at 21:17@Sivan, 开源的不[回复]Sivan 回复:May 1st, 2009 at 21:21@Showfom, 应该是~ [回复]Showfom 回复:May 1st, 2009 at 21:23@Sivan, 我知道了,就算不开源你也会去用,就像我一样,对不对? [回复]Sivan 回复:May 1st, 2009 at 21:24@Showfom, 我是没仔细看。不过不开源的确也用,以前discuz没开源的时候一样是用。[回复]Showfom 回复:May 1st, 2009 at 21:25@Sivan, 真是的,我搜索不到,发给我地址。twitter上发给我得了[回复] @xyouyou 发表于2009年09月12日09:54我想说的是,这不是我要找的[回复]欢迎写下您的评论,其中 * 为必填项目 姓名 * Email (不会被公开) * 网站 (设置头像)这里写下你想说的话img.wp-smiley-select {cursor: pointer;} /**/ […]

Copyright © 2025 · No Sidebar Pro on Genesis Framework · WordPress · Log in