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

Martin Malden
Owner – WealthyDragon

Website owner: Martin has been working online since 2006 and focuses on two areas: 1) affiliate marketing and 2) designing and building websites based on WordPress. He has his own WordPress agency, and serves clients in Hong Kong, Australia and the UK.

Other articles on Affiliate Marketing

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

Affiliate Marketing: How to Get Started

If you’re threatened with, or facing, unemployment in the current pandemic, I can imagine how you must feel. But having something to focus on, a way out, will help. Affiliate Marketing is a huge and growing industry, and one of the best ways to make money online. In this article I go through:A checklist for… 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

The Wealthy Affiliate Program – Affiliate Marketing Training for Beginners

60-second summary: I’ve expanded on all these points in the full review, which you can read below. This is a 60-second summary setting out the main pros and cons: 1. Pros One-stop-shop. Everything you need to start earning money online in one place The most comprehensive training on affiliate marketing for beginners that I’ve foundThe… 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

What do you think?

Comments on this entry are closed.

  • Ben Sep 24, 2010 @ 8:07

    I never thought of the reason of just making one change if the link gets info gets changed. That is good.

    I always use 301 just for the look of the link.

    • Martin Sep 25, 2010 @ 7:22

      Ben, hi,

      Yep – you can save yourself a lot of time and lost commissions by only having to change an affiliate link in one place.

      Cheers,

      Martin.

  • mike Apr 1, 2011 @ 4:40

    Hi
    and thanks for this info, but I`m still a little confused with all this, Ive only ever used a wp plugin for cloaking before now and this code stuff is dbl dutch to me, could you make a video explaining this ?
    Mike.

    • Martin Apr 1, 2011 @ 7:15

      Hi Mike,

      Good idea – I’ll see if I can fit that in at some point 🙂

      Cheers,

      Martin.