Cartoon of Author
via Mastodon

@zackeryfretty

Multiple Affiliate Links / Hoplinks With ClickBank

🗓

Lately I've been doing a lot of work with clients using ClickBank and one of the most common things people seem to be asking about is having multiple Affiliate Links or "Hop Links" with ClickBank. It makes sense that so many people are asking me for this, since, ClickBank doesn't seem to support it out of the box. They only allow you to set one "Hoplink" for your affiliates, so, you can only send all of your traffic to a single URL. I'm surprised they have not found a way to fix this through the GUI since it's a pretty common request.

When you do ask them how to do it they usually give you a long Word Document that explains everything in a really technical way and say to you, "You should get a developer" -- buuut the whole process is really pretty easy to work with. All you need to do is setup a quickie little PHP file that will handle all of the redirects for you.

To do that all you need to do is create a PHP file in your favorite text editor of choice and set it up like the following:

If that doesn't make sense to you off the bat, no problem, I can explain it a little further -- Let's say that your affiliate URL with ClickBank is the following:

http://coolaffiliate.yourname.hop.clickbank.net/

Right now when people visit that URL it takes them to http://your-primary-site.com/ which is perfect, however, you want to push another program over at http://your-side-venture.com/ and want them to be able to direct traffic to that site using the following URL:

http://coolaffiliate.yourname.hop.clickbank.net?id=sideproject

Here's how you'd modify the above to make that happen --

Now when people visit...

http://coolaffiliate.yourname.hop.clickbank.net/

They'll be taken to...

http://your-primary-site.com/

And when they visit...

http://coolaffiliate.yourname.hop.clickbank.net?id=sideproject

Theyll be taken to...

http://your-side-venture.com/

That's it -- you're now able to have multiple affiliate URLs. If you want to setup more than two URLs just keep duplicating the first if{} section as many times as needed (just make sure the else {} is always a the end of it all).

When you've got it setup as you like it go ahead and save the file as...

cb-redirect.php

Then fire up cPanel, FTP, or whatever else you use to access the files on your website and upload this file to the root of your web directory so you're able to access it from...

http://your-primary-site.com/cb-redirect.php

To test it out go ahead and put that in your browser, you should be redirected to whatever URL you put at the end of the else {} statement in your PHP file when it loads -- if it does, everything should be good to go.

The only thing you need to do now is load up ClickBank and put this URL (http://your-primary-site.com/cb-redirect.php) as the HopLink for your affiliates and you're done.

Enjoy your multiple affiliate URLs.

———