1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Masking Affiliate URLs

Discussion in 'Search Engine Optimization' started by Tony Black, Jul 21, 2015.

  1. #1
    Hello all,

    I have been using an iFrame Script to mask my affiliate links, so it goes from page1.html to page2.html, with page2.html showing the affiliate link. I have also used a two page Meta Refresh. The referring URL is usually affiliatesite.com/page1.html and this is fine. However recently a site i used was released into the affiliate referring URL, which i should not have been using.

    Can anyone please help me with some almost foolproof ways of masking your referring URLs from affiliate programs. Whether this is a sophisticated redirect that definitely flushes out the referring link or anything else. Hope someone can help me out, i am really saddened that my redirects are no longer working.

    Tony
     
    Tony Black, Jul 21, 2015 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #2
    You can try this one. Create a page in your root directory (call it links.php or whatever). Insert this code into it:
    <?php
    
    $path = array(
    'affiliatelink1' =>  'http://youraffiliatelink1.com',
    'affiliatelink2' =>  'http://youraffiliatelink2.com',
    'affiliatelink3' =>  'http://youraffiliatelink3.com',
    
    );
    
    if (array_key_exists($_GET['id'], $path))
    header('Location: ' .$path[$_GET['id']]);
    ?>
    Code (markup):
    Then you will have to add this into your .htaccess file:

    
    RewriteEngine On
    RewriteRule ^go/([/_0-9a-zA-Z-]+)$ link.php?id=$1
    
    Code (markup):
    Then you can call your aff. links using this link format:

    
    http://yourdomain.com/go/affiliatelink1
    http://yourdomain.com/go/affiliatelink2
    http://yourdomain.com/go/affiliatelink3
    
    Code (markup):
    Note: the "go" isn't a folder. And if you don't like the "go" change it to whatever you like in both RewriteRule and your domain link.

    PS The idea isn't mine. It should work, though. If it doesn't work just do some Google search to find out more on this or similar solutions.
     
    qwikad.com, Jul 21, 2015 IP
    sarahk likes this.
  3. deepak150

    deepak150 Member

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #3
    You can use affiliate link cloaking software or services. For example, if you are using WordPress then use prettylink plugin to mask your affiliate urls.
    Just search around, there are many options.
     
    deepak150, Jul 21, 2015 IP
  4. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #4
    Some correction there. Call it link.php not links.php

    Ultimately, you can call it whatever you want. Just make sure it's the same file name in your .htaccess file.
     
    qwikad.com, Jul 22, 2015 IP
  5. patco

    patco Well-Known Member

    Messages:
    2,035
    Likes Received:
    47
    Best Answers:
    17
    Trophy Points:
    100
    #5
    I can't find any good plugins that help you with affiliate links cloaking for Wordpress. Do you have an experience with any? :)
     
    patco, Jul 29, 2015 IP
  6. Tony Black

    Tony Black Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #6
    Thanks for your comments everyone.

    I am wanting a redirect script that i can install on my hosting. For instance maybe a 3 page redirect or something a little better at not leaking any referral page data. If anyone can share anything that i can install on my hosting such as a good redirect, please could you share this?
     
    Tony Black, Aug 18, 2015 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    What shortcomings did you find in @qwikad.com's solution?
    It's what most people would recommend
     
    sarahk, Aug 18, 2015 IP