Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice

15 replies
I asked this before on the SEO forum and no-one understood what the heck I was talking about, so let's try here

I have a Clickbank product and obviously the sales page gets a lot of backlinks from affiliates. Trouble is, each of these backlinks is slightly different, because they all have different referring links like

Code:
http://affiliate.vendor.hop.clickbank.net
and also when that is redirected (is the hop a 301? Not sure) it becomes:

Code:
mysite.com/mysalespage/?hop=affiliatename
Would it make sense to put a redirect on my sales page like:

Code:
if (isset($_GET['hop'])) [do 301 redirect back to same page but minus the ?hop= url parameter]
The affiliates cookie would be preserved, and I would concentrate all the links to one canonical URL, which is particularly important if a ton of affiliates are competing with my product keyword, and also to help rank some of the main keywords associated with my product.

Make sense? Does that work?! Or am I missing something here?
#clickbank #hopxxxx #redirect #referrals
  • Profile picture of the author sharpmedia
    Not sure if I understood your question, but what about setting it up to non-existent location and then setting up a custom 404 page - that will get you all the link juice to where to you need.

    Wordpress plugins ('link juice') are created using the same technique.
    {{ DiscussionBoard.errors[5978898].message }}
  • Profile picture of the author markowe
    Hmm, yeah, not sure we're on the same "page" as it were. I don't want to 404 them - did you mean put the canonical link on the 404 page or something? I want to get all non-canonical ("duplicate page", if you like) links like:

    Code:
    mysite.com/mysalespage/?hop=affiliate1
    mysite.com/mysalespage/?hop=affiliate2
    mysite.com/mysalespage/?hop=affiliate3
    and 301 them all to:

    Code:
    mysite.com/mysalespage/
    so that just one page gets the benefit of all the links. Does that make sense?
    Signature

    Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

    {{ DiscussionBoard.errors[5979561].message }}
  • Profile picture of the author phpg
    Probably you can just add <link rel="canonical" href="http://mysite.com/mysalespage/" /> to your page header
    {{ DiscussionBoard.errors[5979842].message }}
    • Profile picture of the author markowe
      Originally Posted by phpg View Post

      Probably you can just add <link rel="canonical" href="http://mysite.com/mysalespage/" /> to your page header
      Now that would really make things easier!

      I just know other Clickbank vendors have complained about this issue of "non-canonical" links, but it seems there is a simple solution, I just wonder why they didn't implement it... In fact, I am sure may vendors DO do something like this because you don't see the ?hop=xxxx when you click through to their sales page.
      Signature

      Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

      {{ DiscussionBoard.errors[5979853].message }}
  • Profile picture of the author phpg
    rel=canonical is relatively new, not everyone's familiar with it or how it works, so they use good old 301 redirect. Theoretically in your situation rel=canonical is even more correct way than 301, in practice it's just easier.
    {{ DiscussionBoard.errors[5979914].message }}
    • Profile picture of the author markowe
      Originally Posted by phpg View Post

      rel=canonical is relatively new, not everyone's familiar with it or how it works, so they use good old 301 redirect. Theoretically in your situation rel=canonical is even more correct way than 301, in practice it's just easier.
      Hey thanks, I never really understood that rel=canonical could be applied to this precise problem.

      I just looked in my page source code and see that All-in-One SEO is correctly showing the rel=canonical link for that page, whatever variant of the permalink I try! So I guess I got the benefit of all those links all along That must be why my rankings have improved so much lately

      Thanks for the help, case closed.
      Signature

      Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

      {{ DiscussionBoard.errors[5979993].message }}
  • Profile picture of the author Jack Clark
    You could do a 301 redirect like proposed earlier. That is what Amazon does to all of it's affiliate links, which is part of the reason that they have so much link juice.

    Rel = "canonical" isn't 100% reliable for redirecting juice.
    {{ DiscussionBoard.errors[5982047].message }}
    • Profile picture of the author markowe
      Originally Posted by Jack Clark View Post

      You could do a 301 redirect like proposed earlier. That is what Amazon does to all of it's affiliate links, which is part of the reason that they have so much link juice.

      Rel = "canonical" isn't 100% reliable for redirecting juice.
      Thanks for the tip - I often wondered about Amazon, I am sure they have very much capitalised on all those affiliate links. You've got me thinking again, maybe I will redirect after all - it's not a big deal programming-wise, just a case of whether it makes sense.

      Probably ideally I would do it in .htaccess, but I hate those regular expressions, grrr... Sure I will figure something out though. Otherwise will just do it in PHP.
      Signature

      Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

      {{ DiscussionBoard.errors[5982246].message }}
  • Profile picture of the author mojojuju
    Originally Posted by markowe View Post


    and also when that is redirected (is the hop a 301? Not sure) it becomes:
    Yes, Clickbank does all hoplink redirections with 301 status codes.

    The way I'd do it if I wanted to get rid of the ?hop=xxxx in URLs would be to put the following in a .htaccess file, provided you're using Apache:


    Code:
    <IfModule mod_rewrite.c>
    
    # Enable URL rewriting
    RewriteEngine On
    
    # Get rid of "?hop="
    RewriteCond %{QUERY_STRING} ^hop=
    RewriteRule ^(.*)$ /$1? [R=301,L]
    
    </IfModule>
    This makes sure that ?hop=xxxx is removed from the final url and visitors are redirected to the main URL with a 301 status code.
    Signature

    :)

    {{ DiscussionBoard.errors[5983037].message }}
    • Profile picture of the author Earnie Boyd
      Originally Posted by mojojuju View Post

      Yes, Clickbank does all hoplink redirections with 301 status codes.

      The way I'd do it if I wanted to get rid of the ?hop=xxxx in URLs would be to put the following in a .htaccess file, provided you're using Apache:


      Code:
      <IfModule mod_rewrite.c>
      
      # Enable URL rewriting
      RewriteEngine On
      
      # Get rid of "?hop="
      RewriteCond %{QUERY_STRING} ^hop=
      RewriteRule ^(.*)$ /$1? [R=301,L]
      
      </IfModule>
      This makes sure that ?hop=xxxx is removed from the final url and visitors are redirected to the main URL with a 301 status code.
      But using .htaccess you would not be able to track the affiliate link with your software. The OP wants to receive the hop value and then do a redirect with the software.
      Signature
      {{ DiscussionBoard.errors[5983095].message }}
      • Profile picture of the author mojojuju
        Originally Posted by Earnie Boyd View Post

        But using .htaccess you would not be able to track the affiliate link with your software. The OP wants to receive the hop value and then do a redirect with the software.
        Well I don't see where he said he wants to track affiliate IDs, but if he wants to do that, he can easily do so with PHP.

        <?php

        # See if the hop variable exists.
        # If it does, do all of the following stuff.
        # If it doesn't, then do nothing

        if (strlen($_GET[hop]) > 0) {


        /*
        Put whatever you want here to track the affiliate id,
        store it in a database or whatever...
        */


        # Send the visitor to the sales page without "hop" in the URL

        Header( "HTTP/1.1 301 Moved Permanently" );
        Header( "Location: http://mysite.com/mysalespage/" );

        }

        ?>
        Signature

        :)

        {{ DiscussionBoard.errors[5983194].message }}
  • Profile picture of the author markowe
    Hi, no, it's true, I didn't say I wanted to track the affiliate IDs, just to make sure their cookie stayed intact and they got their commissions, which I see no problem with, as the cookie is dropped during the hop, nothing to do with my site.

    But now you mention it, it's not a bad idea to actually log the affiliate IDs 'PHP-side', which I can't if I do it in .htaccess. I guess it's just .htaccess is the only sure way to enforce the redirect, Header() can always fall foul of some browser setting or other?

    Anyway, thanks for all the help, priceless stuff, especially that .htaccess code as I just get brain-melt when dealing with .htaccess and regexp...!
    Signature

    Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

    {{ DiscussionBoard.errors[5990090].message }}
  • Profile picture of the author phpg
    Actually header() has nothing to do with browser settings, it's similar to .htaccess redirection, the difference is that with .htaccess you don't call php and save some (very little) resources that way.
    {{ DiscussionBoard.errors[5990246].message }}
    • Profile picture of the author markowe
      Originally Posted by phpg View Post

      Actually header() has nothing to do with browser settings, it's similar to .htaccess redirection, the difference is that with .htaccess you don't call php and save some (very little) resources that way.
      Really? I am not so clued up on http headers, but aren't they basically information sent to the browser, which the browser can act on, or maybe not if some plugin or extension prevents it for some reason? Same as meta refresh in that respect?
      Signature

      Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

      {{ DiscussionBoard.errors[5990314].message }}
  • Profile picture of the author phpg
    In theory browser can ignore http header (though they usually don't), but the case is php header() redirect and .htaccess redirect do the same thing - insert Location directive in the http header. You can use .htaccess rewrite without redirect, but that's completely different thing and not what you need.
    {{ DiscussionBoard.errors[5990398].message }}

Trending Topics