Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Automatically Link Keywords with Affiliate Links in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to automatically link keywords with affiliate links in WordPress?

Many content creators make money online by promoting products through affiliate links. However, if you forget to manually add affiliate links in blog posts, then you are missing out on potential earnings.

In this article, we will show you how to automatically link keywords with affiliate links in WordPress.

Adding automatic links to keywords with affiliate links in WordPress

How do Automatic Affiliate Links Work in WordPress?

Affiliate marketing allows you to earn a steady income online by promoting products or services from reputable companies.

However, sometimes, you may forget to add an affiliate link to a product, missing out on an opportunity to earn some money. This problem gets even bigger when you have a multi-author blog.

Affiliate link management plugins can fix that problem and help you maximize your earnings.

These plugins allow you to convert specific keywords or brand mentions into affiliate links automatically. This can help you unlock more revenue from the existing blog posts on your WordPress website.

Another advantage of automatic affiliate linking is that it will also add links to your older articles where a specific keyword is mentioned. This allows you to not just monetize your new content but also take advantage of your older articles.

That being said, let’s take a look at how to easily set up an automatic affiliate link solution on your WordPress site. We will cover 2 methods, and you can use the quick links below to jump to the one you want to use:

ThirstyAffiliates is the best affiliate link management plugin in the market. We use it on our own websites, including WPBeginner.

First, you need to install and activate the ThirstyAffiliates plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Note: You will need the pro version of the plugin to unlock the auto-linking keywords feature.

Upon activation, head over to the Thirsty Affiliates » Settings page from the WordPress admin sidebar and switch to the ‘License’ tab in the left column.

Here, simply paste your license key for the plugin and click the ‘Activate License Key’ button.

You can find this information in your account on the ThirstyAffiliates website.

Activate ThirstyAffiliates license key

Once you’ve done that, switch to the ‘Autolinker’ tab from the left column.

From here, you can start by setting a limit to how many links per keyword the auto linker sjould place.

For example, if you type the number 5, then ThirstyAffiliates will automatically stop auto-linking the keyword with the affiliate link after 5 times.

Configure autolinking keyword limit

Next, check the ‘Random Autolink Placement?’ option to add affiliate links globally on your website.

After that, you can even check the ‘Link inside of heading tags’ option to automatically add affiliate links to your headings.

Configure autolinking settings

Once you’ve done that, you can also disable auto-linking on the archive and home page of your website if you like.

Next, check the ‘enable autolinking in feeds’ option to maximize your earnings from readers who only read your website via RSS readers. Another advantage is that this lets you make money from people who are scraping/stealing content from your site.

Since most scraping scripts steal the article from your RSS feed, these articles will contain your affiliate links. Since we started our blog in 2009, we have made thousands of dollars from sites that steal our content by using this technique.

Enable autolinking in feeds

Once you have configured your settings, don’t forget to click on the ‘Save Changes’ button to store your settings.

Now visit the ThirstyAffiliates » New Affiliate Link page from the WordPress dashboard to start creating your affiliate link.

Once you are there, type a link name and then add the referral link that you were provided by the company in the ‘Destination URL’ field.

For more detailed instructions, please see our tutorial on how to add affiliate links in WordPress with ThirstyAffiliates.

Add affiliate link

Now, to auto-link the referral link with a keyword, scroll down to the ‘Autolink Keywords’ section.

Here, type all the keywords that you want to be automatically linked.

You can add multiple keywords separated by a comma. You can also set a limit on how many times a keyword can be linked in an article.

Autolink keywords

In most cases, we recommend a limit of 1 link per keyword. In the past, we used to have 3 links per keyword, but it gets really crowded as your site grows and you have hundreds of affiliate links.

Finally, don’t forget to click on the ‘Save link’ button to add your affiliate link.

Now, every time these keywords appear in an article, they will be automatically linked with the affiliate link you added above.

Pretty Links is another great affiliate link manager and URL shortener plugin for WordPress. It allows you to easily manage your links in WordPress and use the auto-linking feature to automatically add affiliate links to your blog posts.

To decide which plugin is the right one for you, please see our comparison of Pretty Links vs. ThirstyAffiliates: which is right for your site?

First, you need to install and activate the Pretty Links plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, go to the Pretty Link » Activate Pro page to enter your license key. You can find this information in your account on the Pretty Links website.

Activate license

Next, head over to the Pretty Link » Add New Link page to add your affiliate links.

First, you need to select a redirection type. You should use 301 permanent for all affiliate links.

After that, add the target URL and the URL you want to use as the shortened or cloaked URL.

You also need to add a name for the link in the title field and any other notes.

Add affiliate link in Pretty Links

Once you’ve done that, switch to the ‘Pro’ tab from the left column.

From here, type the keywords that you want to auto-link with the affiliate link next to the ‘Keyword’ option.

You can also add multiple keywords separated by commas.

Auto link keywords in Pretty Links

Don’t forget to click on the ‘Update’ button to save your link. Once you do that, these keywords will be automatically linked in all your posts.

You still need to control how you want automatic links to be added to your articles. You can do this by going to the Pretty Link » Options page from the WordPress sidebar and clicking on the ‘Replacements’ tab.

Auto link options

On this screen, you can enable the replacements as well as set an auto-link threshold, which allows you to limit how many times a keyword will be linked in an article.

You can also set the links to open in a new window and make sure to check the nofollow option.

Don’t forget to click on the ‘Update’ button to save your changes.

Pretty Links is a powerful plugin with tons of options for features like URL shortening, redirection, and affiliate link management. Feel free to explore these options and change them if you need to.

We hope this article helped you learn how to automatically link keywords with affiliate links in WordPress. You may also want to see our tutorial on how to create a referral program in WordPress and our expert picks for the best themes for affiliate marketing.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

6 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.