How to Easily Update Affiliate Links When they Change Using 301 Redirects

Here’s a problem I’ve faced a few times in the past: the owners of products I am promoting as an affiliate have changed their affiliate management system.

This always resulted in them issuing new affiliate links, which was a real pain in the butt.

If you’re doing affiliate marketing you have, no doubt, placed your affiliate links in many different places: different blog posts, different social media accounts and probably a dozen other places you’ve forgotten about.

Tracking down all those links and updating them when you’re given a new affiliate link is a real headache and, doubtless, you will miss some.

Today there are plugins for WordPress that ease this problem and, of course, you can use those link shorteners like Bit.ly

But what if you want to keep plugins on your site to a minimum (always a good idea!), or you don’t like those link shorteners because you can’t brand them?

Answer: set up your own affiliate link redirects.

Setting up your own affiliate link redirects allows you to create links that are:

  1. Branded with your domain name
  2. Relevant to the product you’re promoting

The Solution

So here’s the solution (if you prefer watching this process on a video just scroll down – there’s one at the bottom):

For each product you promote create a folder on your server under your domain. You can do this using either the File Manager within your cPanel or an FTP client like FileZilla.

Name that folder with your product’s name or, if necessary, a shortened version of it.

For example if I’m promoting a product called ‘Thesis’ I would create a folder under  wealthydragon.com  called  thesis 

Then, on your computer, create a file called  index.php , and insert the following code:

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.dummy-affiliate-code.com");
?>

Replace the https://www.dummy-affiliate-code.com in that code with your real affiliate link, taking care to retain the space after ‘location:’ and the double quotes at the end of the link.

Make sure there are no extra spaces before the initial <? character and after the final ?> character.

Save and close the file, and then upload it to the new directory (folder) you created under your domain name.

Check that everything is working properly by typing in the new URL for your affiliate link:

e.g.:  https://www.YourSite.com/thesis  – this is your new ‘affiliate’ link. Anyone who clicks that link will be re-directed to your true affiliate link.

The two benefits of doing this are:

  1. When the owner of your affiliate product changes their system and requires that you change your affiliate links, you only need to make one change: replace the old affiliate link with the new link in your index.php file within the new folder you created. All clicks on your ‘affiliate link’ will then be automatically re-directed to the new affiliate link the product owner has given you. The time this will save you (let alone the loss of money if you miss some of your links) will be enormous.
  2. Your affiliate links will be branded with your domain name and relevant to the product you’re promoting because you used the product name for your new folder. This will increase your click through rate.

Here’s a video that illustrates the process:

Leave me a comment if I can clarify anything 🙂

Cheers,

Martin Malden

Share the love:

Other articles on Affiliate Marketing

The articles below are all focused on affiliate marketing. Click the headline to read the full article

Affiliate Marketing Training for Beginners with Wealthy Affiliate

This is a review of the affiliate marketing training program from Wealthy Affiliate. If you found your way here but you’re still not sure what affiliate marketing involves, I’ve described it here. 60-second summary: I’ve covered all these points in detail in the full review, which you can read below. This is a 60-second summary… Read more

Affiliate Marketing: What it is, How to get Started, How to Find the Best Programs and How to Succeed

Retired and looking for a part time income? Part of the ‘great resignation’? Want to build a side hustle? Affiliate marketing could be the answer you’re looking for. It is low cost and quick to set up, and one of the best ways to establish your own online business. In this article I go through:A… Read more

How to Easily Update Affiliate Links When they Change Using 301 Redirects

Here’s a problem I’ve faced a few times in the past: the owners of products I am promoting as an affiliate have changed their affiliate management system. This always resulted in them issuing new affiliate links, which was a real pain in the butt. If you’re doing affiliate marketing you have, no doubt, placed your… Read more

Wealthy Affiliate Free vs Premium – How do I Choose?

I’ve been a member at Wealthy Affiliate for a year now, and I’m often asked which plan offers the best value – the Starter (free) Plan or the Premium Plan. The answer actually depends on a number of things:Your current level of Internet Marketing knowledge and experienceThe amount of money you have available to invest… Read more

Why You Should Combine Dropshipping and Affiliate Marketing

Dropshipping and Affiliate Marketing Here’s what I cover in this post: What is dropshipping? What is affiliate marketing? The similarities between dropshipping and affiliate marketing Combining dropshipping and affiliate marketing I was searching online this week for the differences between dropshipping and affiliate marketing, really just to see how other people were defining them. But… Read more