Do you like this blog? Give us a like on Facebook X

How to Get Short URLs on Your Own Domain

Want short URLs like yoursite.com/xyz? Here's how you can have short URLs with your own domain name without hosting a shortening service.

Twitter Short URLs Having your own short URLs will help you get the maximum exposure on Twitter. Linking to your blog from Twitter with URLs redirected from URL shortening services makes your domain name invisible and this valuable piece of real-estate on your twitter timeline and in your friend’s updates area is as good as lost. Why not take the space that rightfully belongs to you back in your control and use it for your advantage by displaying your own domain name?

Here are some ways you can have short URLs displayed with your own domain name without having to host a URL shortening service.

Su.pr Short URLs on Your Own Domain

With Su.pr free URL shortening service, you can get short URLs on your own domain (like http://riyaz.net/Qqyx). All you need is a free account with StumbleUpon or Su.pr and that your web host should be running on PHP5 with libCurl.

Steps to Setup Your Own Short URLs with Su.pr

  • Download the Su.pr plugin
  • Unzip the file and edit the supr.php with the information from your Su.pr settings page as described here
  • Upload the updated supr.php to the root directory of your website
  • Add the rewrite rules to rewrite.conf or .htaccess file on your website’s root folder. Rewrite rules can be found in the beginning section of supr.php or on this page.
  • Now go to http://su.pr/settings/ and enter your domain to the list of promoted websites.  Save changes and short URLs service will be synchronized with your website.
  • Now whenver you shorten your URLs using su.pr service, you will get a short URL with your own domain name instead of su.pr.

Short URLs on Your Domain or Subdomain Using Bitly.Pro

Bit.ly Pro allows you to have a custom domain in your short URLs (e.g. http://i.riyaz.net/bbYahf). This free service is still a beta program as of now and requires you to place a request for registration. Once your request is approved you can login and setup your account. You need to have a short domain name registered to you. If you don’t have your own short domain, you can create a subdomain on your existing domain and use it as well.

Steps to Setup Your Own Short URLs with Bitly.Pro

  • If you are using a custom short domain name, you need to set a DNS A Record such that your custom short domain points to bit.ly servers. If you are using a subdomain for your custom short domain, you need to set a CNAME record that points your subdomain to cname.bit.ly.
  • Once you have updated the DNS entries, go to the Bitly.pro settings page and configure your short URLs as per the instructions provided there.
  • Now whenver your shorted your URLs using Bit.ly service, you will get a short URL with your custom domain name instead of bit.ly.

How to Tweet with Your Own Short URL via Tweetmeme Retweet Button

Now that you know how to create your own short URLs, let us set up the Tweetmeme retweet button to tweet URLs branded to your domain name.

All you need to do is edit your Tweetmeme button code to include the URL shortening service and the corresponding API key.

Adding Su.pr generated short URLs to Tweetmeme Retweet Button

Add the tweetmeme_service and tweetmeme_service_api parameters to your Tweetmeme button code as shown below and you are done.

<script type="text/javascript">
tweetmeme_source = 'YOUR_TWITTER_USERNAME';
tweetmeme_service = 'su.pr';
tweetmeme_service_api = 'YOUR_SU.PR_API_KEY_FOUND_ON_SU.PR_SETTINGS_PAGE';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Adding Bitly.pro generated short URLs to Tweetmeme Retweet Button

Make changes to your Tweetmeme button code in the same way as above. You need to include your Bitly.pro username as well in the API key.

<script type="text/javascript">
tweetmeme_source = 'twitter_username';
tweetmeme_service = 'bit.ly';
tweetmeme_service_api = 'bit.ly_username:bit.ly_api_key';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

That’s about it. Domain specific URLs give better quality links and hence give you more clickthroughs. So start using your own short URLs for promoting your blog posts and become more visible. Go ahead and brand your tweets with your own short URLs.

Comments

  1. Hi mates, good article and fastidious arguments commented at this place, I am
    truly enjoying by these.

  2. this information is very useful and benefial. i m really thankful.

  3. Tools gratis says:

    javascript codings can prevent people from seeing the code, but when the browser is about to execute it, it has to have a copy. People can simply disable Javascript or they may look in the browser cache files to see the source codes.

  4. kays jewelry says:

    I appreciate your effort and the quality of the information you provide. It’s really helpfully for me to write content in my assignment. Thanks.

  1. Abid Mallick says:

    Hi ,

    I’m doing an application in webDynpro .Here i want to Suppressed the unwanted URL Parameters.
    for Example
    My actual URL looks like this : ->http://filqua.Mayo.inet:8080/sap/bc/webdynpro/sap/zdoms?sap-language=EN

    i want in the format to be :-> http://doms.Mayo.in

    Please help in this issue.

    Thanks,
    Malik