If you participate in our affiliate program, this post should be beneficial to you. It’s how to link with your affiliate code but conceal your affiliate link.

Affiliate links are usually not search engine friendly, so making them a bit more friendly is always beneficial. There are FOUR EASY STEPS to setup your affiliate links and this can work for any affiliate links you might have.

This not only helps you make the links friendly, but if the affiliate link ever changes, it’s as simple as changing one line in your affiliate link file and it’s updated on all of your pages.

Regarding what to name your affiliate file(s), I originally said to name it unique to your own site. After thinking further, I realized that a lot of webmasters want to completely hide who they’re working with from the search engines. If this is something that is a concern for you, here are two additional steps to add:

  • Name your affiliate file with common words found on all sites. Example names: file.php, html.php, page.php, add.php

    Or make it even tougher and use their names: google.php, search.php, yahoo.php, googlebot.php

  • Now prevent search bots from following your links. Use the rel=”nofollow” when linking to your affiliate file. For example, if you name your affiliate file “google.php”, link to the file like this:


    You can also use your robots.txt file to block them from reading your affiliate file(s).

    Disallow: /path/to/google.php

Of course, the last two steps are only necessary if you want to disguise who you’re affiliated with. I am seeing more and more affiliate links in the SERP’s ranked really well, so if you don’t need to hide things, shoot for being ranked. Having your affiliate link ranked well translates into more money in your pocket!

**Updated Again**
Muhammad added a JavaScript technique of setting up your affiliate links I thought was worthy of a read.