| | #1 |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
|
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 Code: mysite.com/mysalespage/?hop=affiliatename Code: if (isset($_GET['hop'])) [do 301 redirect back to same page but minus the ?hop= url parameter] Make sense? Does that work?! Or am I missing something here? |
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | |
| |
| | #2 |
| Warrior Member Join Date: 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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. |
| |
| | #3 |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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 Code: mysite.com/mysalespage/ |
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | |
| |
| | #4 |
| HyperActive Warrior War Room Member Join Date: 2004 Location: , , .
Posts: 179
Thanks: 5
Thanked 44 Times in 33 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
Probably you can just add <link rel="canonical" href="http://mysite.com/mysalespage/" /> to your page header
|
| |
| | #5 | |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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. | |
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | ||
| |
| | #6 |
| HyperActive Warrior War Room Member Join Date: 2004 Location: , , .
Posts: 179
Thanks: 5
Thanked 44 Times in 33 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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.
|
| |
| | #7 | |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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. | |
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | ||
| |
| | #8 |
| Bob Join Date: 2011
Posts: 31
Thanks: 2
Thanked 2 Times in 2 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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. |
| |
| | #9 | |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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. | |
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | ||
| |
| | #10 | |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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> | |
|
:)
| ||
| |
| | #11 | |
| HyperActive Warrior War Room Member Join Date: 2012
Posts: 290
Thanks: 13
Thanked 46 Times in 46 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
| |
| | ||
| |
| | #12 | |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
<?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/" ); } ?> | |
|
:)
| ||
| |
| | #13 |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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...! |
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | |
| |
| | #14 |
| HyperActive Warrior War Room Member Join Date: 2004 Location: , , .
Posts: 179
Thanks: 5
Thanked 44 Times in 33 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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.
|
| |
| | #15 |
| The Wordbay Guy War Room Member Join Date: 2010
Posts: 1,926
Thanks: 266
Thanked 437 Times in 265 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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?
|
|
Who says you can't earn money as an eBay affiliate any more? My stats say otherwise | |
| |
| | #16 |
| HyperActive Warrior War Room Member Join Date: 2004 Location: , , .
Posts: 179
Thanks: 5
Thanked 44 Times in 33 Posts
| Re: Redirect Clickbank referrals (?hop=xxxx) back to canonical page to maximise link juice
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.
|
| |
|
| Bookmarks |
| Tags |
| clickbank, hopxxxx, redirect, referrals |
| |