If you want to make money with affiliate marketing, you need to include affiliate links on your site so that you can drive traffic and get credit for the sale. But inserting WordPress affiliate links takes time, and it’s hard to remember all the relevant links that you need to include.
Rather than trying to manually add affiliate links to every piece of content on your site (which can get especially frustrating if you try to update old content in the future), there are some tools that you can use to automatically insert affiliate links into your WordPress content.
In this post, we’ll give you a step-by-step tutorial for how you can use a premium plugin to automatically insert WordPress affiliate links.
Then, we’ll also share a free, but less feature-rich, alternative.
The benefits of automatically inserting WordPress affiliate links
With a simple plugin like Pretty Link Pro and its keyword and URL replacement tool, you can specify exactly which keywords should be linked (and to which affiliate link). That means:
- You don’t leave money on the table by missing some of your affiliate links.
- You’re able to cut down on the time spent linking by specifying which of your keywords should have certain WordPress affiliate links.
- You get the bonus of shortening your affiliate links for a cleaner look.
How to automatically insert WordPress affiliate links
We’ll cover a free alternative after this tutorial, but the most effective method for adding automated links is by using one special feature inside of the premium Pretty Links Pro plugin.
It’s called the Keyword and URL replacement tool. Unfortunately, that feature is not available in the free version. Luckily, the Pro version only costs $57 per year.
Step 1: Download and install Pretty Links Pro
I would recommend going with the Beginner Plan, unless you’d like to use the plugin on up to 10 sites.
Walk through the checkout process and download the plugin to your computer. After that, install the plugin on your WordPress dashboard.
Since this is a premium plugin, Pretty Links will send you your license key in an email, or you can log in to your account to find it.
To enter your license key, click on the Activate Pro link in your WordPress dashboard and paste in the key.
Step 2: Add a new affiliate link
Locate the Pretty Links tab in your WordPress dashboard. Then, click on the Add New Link button.
This area is where you’ll add your affiliate link. The first field has several options in the dropdown for specifying the type of redirect you want to use. For an affiliate link, you should choose 301 (Permanent).
The Target URL is your affiliate link. For this example, I selected a long Amazon affiliate link that leads to a Coleman four-person tent. Let’s pretend that this test blog I’m putting together is about camping or travel.
The next field lets you specify a clean URL (AKA a “Pretty Link”). This isn’t entirely necessary for automatically creating WordPress affiliate links, but it cloaks the URL for you.
Finally, the Title is an internal feature that helps you remember what the link is for. It will be much easier to check back on this Pretty Link if you know exactly what the product is.
Step 3: Configure the advanced and pro options
If you scroll down, you’ll notice a heading for Advanced Options. Open this section.
These are completely optional for the purpose of the tutorial, but you may want to put some of your Pretty Links into groups, add nofollow tags, or track clicks.
The more important part of the process is under the Pro Options.
For most affiliate links, you should not check the Expire box.
However, you will want to add Keywords. These are the words that will be automatically linked to this affiliate link.
Be sure to separate the keywords with commas. After deciding on the right keywords, click on the Create button to activate the automated linking.
Step 4: Configure the keyword and URL auto replacement options
In order to avoid filling your site up with affiliate links, you’ll need to configure the global Keyword & URL Auto Replacements Options.
To access these settings, go to Pretty Links > Options > Replacements in your WordPress dashboard.
Make sure to check the Enable Replacements box. Then, you should also check the box for Thresholds. This lets you set a maximum number of automatic keywords/affiliate links. Basically, you want to avoid a situation where your post is packed with affiliate links. When in doubt, 3 is a good option.
I’d also recommend opening your links in new windows and adding the nofollow tag:
Step 5: Test it by writing a new blog post
This is obviously a short, test blog post, but I included some sentences with the keywords I wanted to be replaced. After writing your post, click on the Preview or Publish button, depending on where you’re at in the editing process.
When you look at your post, you should see that the keywords you chose now have working WordPress affiliate links.
And that’s it! The plugin will now automatically insert the affiliate link in any piece of content with the keywords that you specified.
A free alternative for automatically inserting WordPress affiliate links
Most plugins that you’ll find for shortening or cloaking links only provide the URL replacement functionality as premium add-ons or subscriptions.
However, the Easy Affiliate Links plugin is the closest thing you can get to this feature without having to pay any money.
Current Version: 3.7.1
Last Updated: March 21, 2023
The plugin isn’t as intuitive or powerful as Pretty Links Pro, but it does still have the option to name your link, paste in an affiliate URL, and set the keywords for replacement.
Do you have any other questions about how to automatically insert WordPress affiliate links using this method? Let us know in the comments and we’ll try to help out!
Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!