How can I mask affiliate links?

15 replies
I am trying to setup a simple masking of a link but cant find any codes that mask the destination when people hover over the link with their mouse. The below link seems to have worked but I tried it on IE8, Firefox, and Chrome and it doesnt work. On IE8 it doesnt show anything at the bottom left status bar while the other 2 show the affiliate link location.

<a href="affiliate link destination" onmouseover=" window.status=What You See On Mouse Over; return true" onmouseout="window.status=''; return true">Anchor Text</a>

Does anyone know of any free masking codes? Thanks in advance.
#affiliate #links #mask
  • Profile picture of the author Adrian Cooper
    I use SSR's - server side redirects - usually, that way they are processed at the server instead of on the web page using Javascript etc.

    You can set simple re-directs in cPanel, but I code them directly in to .htaccess for greater control and also because some affiliate code contains characters, dynamic components etc that the cPanel facility will not accept.

    Google knows about JS and other web page side strategies, but cannot know about SSR's.
    {{ DiscussionBoard.errors[846424].message }}
  • Profile picture of the author Joel O
    Just so I understand that you want... you just want people NOT to see where the link is going when they hover over, correct?

    I am sure where is code to do that, however I am just wondering why you want to hide that.

    Or would you rather redirect/cloak the affiliate link instead?

    Original affiliate link example: example.com/affid=123
    Redirect affiliate link example: examplesite2.com/productname

    The redirect hides/cloaks the affiliate link so that people cant change the link to their affiliate link. There are many affiliate link cloakers out there, you can even use a shorten url service, search Google for "shorten url".

    I hope that helps a bit,
    Joel Osborne
    Signature

    Have you taken massive action today?

    {{ DiscussionBoard.errors[846427].message }}
  • Profile picture of the author Adrian Cooper
    With an SSR you would simply add a link on your page e.g.:

    http://www.yourdomain.com/more_information.html

    Which looks like a link to another page on your site providing more information - whether someone hovers over it or not - but at the server side you have the affiliate link so when someone clicks the link it takes them directly to the merchant sales page.

    There is no way a user - or Google - could ever know it is an affiliate link.
    {{ DiscussionBoard.errors[846436].message }}
    • Profile picture of the author deanmoney
      I did find a code that works but the problem is when people open my affiliate link in a new window/tab it takes them to the mouse over location and not your affiliate link.

      <a href="The Link During Mouse Over"onclick="parent.location.href='/Your Affliate Link; return event.returnValue=false">Anchor Text</a>

      I am not trying to send people to a link via an affiliate code but via my "redirect 301" in .htacess so my affiliate link looks like:

      /affiliate-1 under my website name.

      I am trying to mask /affiliate-1 with it opening up in a new tab/window.
      {{ DiscussionBoard.errors[846781].message }}
      • Profile picture of the author deanmoney
        I guess nobody knows how to mask links in new tabs/windows? Oh well.
        {{ DiscussionBoard.errors[847087].message }}
  • Profile picture of the author hamerz
    There are several ways to do this. Some people like to use the .htaccess file of a simple php redirect.

    A quick search in google should yeild you some good info on these technivques and depending on what is available to you and you technical level - you'll find one that you like. Search for things like 'hide affiliate link" or "affiliate link cloner", etc.

    My favorite way to do this is using javascript.

    You'll add a reference to the script in you webpage:
    <script type="text/javascript" src="mylinkredirector.js"></script> //I actually use a file name that is nondescript so that people don't go snooping around.

    Then there is javascript code in the that file that watches for your clicked links, when one of the links matched what you set up - it will be redirected to your affiliate link.

    So all clicks to Example Web Page are redirected to http://XXXXXX.example.hop.clickbank.net (using clickbank for an example).

    There is a product from Robert Plank that I've seen that has this well documented called PHP Uncensored.

    You can also search for "javascript link redirect" in google but nothing is as clear as what Robert puts together.

    Also, make sure that when redirecting - stay within the Google TOS and use it appropriately.

    Cloaking, sneaky Javascript redirects, and doorway pages - Webmasters/Site owners Help

    Good Luck.
    {{ DiscussionBoard.errors[846526].message }}
    • Profile picture of the author radhika
      Code:
      <a href="http://www.youraffiliate-link.com" onMouseOver=
      "window.status='your text here!'; return true" onMouseOut=
      "window.status=''; return true">Click here</a>
      Try above. (In single line)

      .
      Signature
      Follow up Autoresponder PRO :: 33% Discount!!
      FREE Upgrades! IMPROVED Email Deliverability!!
      {{ DiscussionBoard.errors[846554].message }}
  • Profile picture of the author khtm
    This thread has tons of ideas.

    http://www.warriorforum.com/main-int...iate-link.html

    I personally use PHP redirect so I have full control over everything and can even send people from different countries to different affiliate sites.

    What you're trying to do won't work in the latest browsers as they ignore javascript status bar requests (I'm guessing because of how many people abused this feature in the past).

    Good luck!

    Originally Posted by deanmoney View Post

    I am trying to setup a simple masking of a link but cant find any codes that mask the destination when people hover over the link with their mouse. The below link seems to have worked but I tried it on IE8, Firefox, and Chrome and it doesnt work. On IE8 it doesnt show anything at the bottom left status bar while the other 2 show the affiliate link location.

    <a href="affiliate link destination" onmouseover=" window.status=What You See On Mouse Over; return true" onmouseout="window.status=''; return true">Anchor Text</a>

    Does anyone know of any free masking codes? Thanks in advance.
    {{ DiscussionBoard.errors[847127].message }}
    • Profile picture of the author TM_Marketing
      There are many ways you can mask the link, but be careful cloaking the
      link. Sometimes when you are dealing with affiliate programs, you will not
      get credit for the sale.

      Ted
      {{ DiscussionBoard.errors[847373].message }}
  • Profile picture of the author bravegoat
    Would clickbank mind if I cloak my links? Why would they?
    {{ DiscussionBoard.errors[847858].message }}
  • Profile picture of the author bravegoat
    Thanks senve, that's a useful service
    {{ DiscussionBoard.errors[848617].message }}
    • Profile picture of the author marketinggt
      Have you tried a service like bit.ly or budurl?

      To go bit.ly, a simple url shortener.

      It's also great for tracking results and seeing real-time stats. I use this all the time to post affiliate links in Twitter posts or email.

      If I want to "cloak" it, where it doesn't redirect to the actual page, then I get a domain (for 9.95) and redirect using "FRAME" where the destination url is never shown to the visitor.

      Hope that helps!

      --Joey
      Signature
      Leverage the Power of Twitter for Success!
      5-Part Twitter Webinar Series - Twitter Blockbuster
      http://www.TwitterBlockbuster.com - WSO SPECIAL!
      http://www.Joey-Smith.com - My Power Blog
      http://www.MarketingGT.com - 8 Simple Skills!
      {{ DiscussionBoard.errors[848636].message }}
  • Profile picture of the author Adrian Cooper
    Google know about most if not all on page re-direct methods such as Javascript. They do not like re-directs of any sort because they have been abused so much in the past.

    Server side is the only technically sound way of doing it, and if you learn .htaccess you can do some really complex things. I once had an .htaccess file that was thousands of lines long because I was cloaking using User Agents and known Google, Yahoo and MSN IP addresses, but it was too much of a hassle to keep it updated.

    I definitely recommend getting a good book on .htaccess, and if you are really brave a book on Regular Expressions. These are power tools that have almost unlimited possibilities.
    {{ DiscussionBoard.errors[848842].message }}
    • Profile picture of the author LovelyCornSyrup
      Originally Posted by Adrian Cooper View Post

      Google know about most if not all on page re-direct methods such as Javascript. They do not like re-directs of any sort because they have been abused so much in the past.

      Server side is the only technically sound way of doing it, and if you learn .htaccess you can do some really complex things. I once had an .htaccess file that was thousands of lines long because I was cloaking using User Agents and known Google, Yahoo and MSN IP addresses, but it was too much of a hassle to keep it updated.

      I definitely recommend getting a good book on .htaccess, and if you are really brave a book on Regular Expressions. These are power tools that have almost unlimited possibilities.
      What's wrong with having the index of a directory contain:
      HTML Code:
      <html xmlns="http://www.w3.org/1999/xhtml">    
        <head>
        <meta name="robots" content="noindex" />
        <meta http-equiv="refresh" content="0;URL='http://www.affiliateUrlHere.com'" />    
        </head>    
        <body> 
        </body>  
      </html>
      That would mask the URL, so on mouse over it'd read 'http://www.siteName.com/directory/' rather than seeing the affiliate URL. The search engines wouldn't index it, and it works in every browser regardless of whether or not the user has Java installed or no-script active.

      The only way a search engine will nuke a website out of their index is if the pages within their index are being refreshed to load other pages. As long as the page isn't indexed they've got no problems with them.
      {{ DiscussionBoard.errors[2852070].message }}
  • Profile picture of the author kjfuller1
    Bit.ly is my favorite url cloaker.
    {{ DiscussionBoard.errors[2852020].message }}

Trending Topics