Auto Affiliate Links


Auto Affiliate Links will automatically add affiliate links into your content. You can manually set affiliate links and keywords where they should be added into your content, or you can let the plugin to automatically extract and display links from Amazon, Clickbank, Shareasale, Ebay, Walmart, Commission Junction, BestBuy and Envato Marketplace.

IMPORTANT: Your content won’t be modified in any way. The links are added when the content is displayed.

If you prefer to select your keywords and add your links manually, you can do this from “Auto Affiliate Links” menu in your administration panel. In “General Settings” you can set if you want the links to be cloaked, if you want them to be added on your homepage or not and several other options.

Also, you will have options to make the links nofollow or dofollow, to open in new page or same page and to cloak links. The plugin will give you the most used 100 keywords from your content si you can easily add affiliate links to appear when they are displayed.

You can limit the number of links that are shown in every article. The frequency range from “Very Low” to “Very High”. At Very Low level only 1 link will be displayed in every article. At “Very High” frequency a maximum of 5 links will be added to every article.

If you choose to automatically generate and display links from Amazon, Clickbank or Shareasale you have to first request an API key, and then to activate each module. The links will be added trough javascript so you do not have to worry about nofollowing and search engines.


  • Affiliate link management

  • General Options

  • Amazon Links

  • Post example 1

  • Post example 2


This section describes how to install the plugin and get it working.

  1. Upload the plugin to the /wp-content/plugins/ directory or download it directly from your administration panel.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to ‘Auto Affiliate Links’ menu in your WordPress Admin panel.
  4. Add your affiliate links, along with one or more keywords. Do this for every affiliate link you want to display.
  5. Select if you want your links to be nofollow, cloaked, to open in new window, and the maximum number of lniks that are added to every article. On some environments, the cloaking of the links is impossible. If you experience problems, turn the cloaking off and it should work just fine.
  6. If you don’t get it how to make it work, or if something goes wrong, please consult for more info and use the contact form on the website to report the problem or to ask for help.


The plugin will modify the content in the database ?

No, the plugin only add the links when the page is rendered. The content remain intact in your database.

Cloaked links are not working, what should I do ?

Link cloaking can cause problems on some environments ( shared hosting with too many restrictions ). If you experience problems please turn cloaking off.

Do i have to change my theme to make the plugin work?

No theme changes are needed for this plugin.

How it will affect my design and blog functionality ?

The blog functionality will not be affected in any way. Links will be added in your content and they will look just like normal links.

How do I make links nofollow ?

On the plugin management page: “Auto Affiliate Links” under “Settings”, you will have the option to set a link to have rel=”nofollow” attribute.

How do I make the links to open in new window ?

On the plugin management page: “Auto Affiliate Links” under “Settings”, you will have the option to set the links to open in new or in the same window. By default, links will open in a new window. As a matter of fact, it is better for external links to open in new window, so the user will notice that he is on another website right now, and to have your website still open, if he want to read more or to visit another link.

Can I add the same affiliate link with more keywords ?

Yes. You can add more keywords in the same box, sepparated by comma. For example: “android,smartphone,phones”. If you add the same link 3 times with different keywords the result will be the same: The link will appear for all the keywords added.

Can I add more links for the same keyword ?

If you add more links with the same keyword, only the first occurence of the keyword will add the first link. If the same keyword appear again in the article, the second link will be added on it.

How Clickbank links work

First you have to request an API key from the “API Key” menu. Then, from the “Clickbank Links” menu you will have to enter your affiliate id, category and minimum gravity ( leave 0 for all links ), and set the plugin to “active”. Once you do this links from clickbank will start to show on your pages.

The plugin makes my blog to show odd html code

If you encounter any problem with the plugin, please contact us using the form at and we will help you to solve your issue. It has been reported that some lightbox plugin my be interfeering with our plugin.

Is there a maximum limit on number of manual links I can import?

There isn’t a software limit of how many links you can import. However, you should take into account that uploading a big file at once might cause problems with: maximum file size upload limit on your server ( it is usually 2MB ), and the fact that the script can break or exceed maximum execution time ( 30 seconds ), and only a part of the links will be saved. You should break your uploads into 100-200 links at once.

VERY IMPORTANT. Processing big lists of links ( over 500 ), might cause high server load if you are on a shared hosting, and the page load will be affected. Make sure that you only put the amount of links that you server can handle. With under 500 links you should be safe on every server type.

My CSV Import file is not working

Before attempting to import a file, make sure that the csv file is encoded as text file and does not have any custom formatting in it.

Microsoft Excel adds odd formatting to the file and making problems at import and even breaking it. When you save a file in Microsoft Excel, make sure that you check the document type to be txt or csv, to prevent odd formatting, and on that page it should also let you select the separator or delimiter.

If you can’t find the options to do this, try LibreOffice, as it is a bit easier to find them there.


4 Ottobre 2023
Hi everybody, I need to automate the creation of a link to another site so that when a unregistered user makes a new post that will contain http, that post will automatically appear as a link and not as plain text.For example, after inserting this text (“”), it will automatically be created as a link to the given page: I tried plugins Frontend Post Submission Manager Lite , User Submitted Posts but failed with theme. can you please advise me how to do it?
14 Luglio 2022 2 risposte
O Plugin pe bom, no entanto há um conflito com URL publicado manualmente no publicador do Wordpress: Por exemplo, quando colocamos alguns links após “leia mais” e a palavra chave está sendo usado no texto âncora, o conflito com o plugin acontece quando quebra o texto âncora não ficando completo como link normal de um “leia mais ou leia também”.
11 Aprile 2021 4 risposte
I had to deactivate this as it was causing my WPRM recipes to be duplicated over and over. Possibly a cache issue, I use litespeed but I’m not an expert so I wouldn’t have an idea what to do to make the play together.
Leggi tutte le recensioni di 37

Contributi e sviluppo

“Auto Affiliate Links” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.




  • Added ability to add links on rss feed


  • Fixed security issue on mass delete links

  • Added extra security and capabilities check on link manipulation ajax functions


  • Added option to disable link insertion in Wp Foro content

  • Added support for Meta Box fields

  • Added some extra security checks

  • Tested and updated to work with WordPress 6.4.2

  • Added security nonces for exclude terms and words pages

  • Added security nonces in exclude post page

  • Tested and updated to work with WordPress 6.4

  • Fixed issues with CJ datafeed upload

  • Fixed import/export link options order to allow import of links exported with previous versions

  • Added extra check for cache values


  • Added button to flush excluded posts


  • Sanitized exclude post by date field


  • Extended and improved cache system

  • Tested and updated to work with WordPress 6.2

  • Added back to management links in modules admin pages


  • Added option to select the number of links to be displayed in admin page

  • Fixed amazon links that were not working in some locales


  • Added pagination for affiliate links

* Fixed nonces on plugin settings page

  • Updated some missing files

  • Fixed nonce check for delete link button


  • Added automated link generation from Discovery Japan Affiliate Network

  • Added some extra checks for plugin actions

  • Changed titles on Generated Links page to avoid confusion

  • Fixed text display on API Management page

  • Fixed some links in API management page

  • Added back button for module pages

  • Added visual confirmation for update link button


  • Added option to allow/dissalow adding links inside span html tags


  • Added support for WordPress Multisite Network sites to use main site added links

  • Fixed clicbank category selection

  • Fixed some option not exported correctly

  • Fixed ClickBank categories selector

  • Added option to make keyword suggestion to work with international characters

  • Updated the list of Amazon local stores

  • Fixed action buttons on edit links form


  • Added option to disable the link disclosure individually for each link

  • Fixed site settings for Envato Marketplace

* Added support for HTML in disclosure text

* Tested and updated to work with WordPress 6.0

  • Fixed some issues with generated links page

  • Added spinner icon when loading links from affiliate networks


  • Added option to sort links by url


  • Improved link sorting functionality

  • 6.1.6

  • Added ajax capability for update link feature


  • Removed autoload for postnotimes option and removed empty meta values


  • Added option to set a custom color for links added by the plugin


  • API js file is not loaded anymore if an API key is not added

  • Tested and updated to work with WordPress 5.9

  • Tested and updated to work with WordPress 5.8.3

  • Made the input fields bigger in plugin admin page


  • Added option to change the filter function priority

  • Fixed link priority for compatibility with wpforo


  • Changed filter priority for better matching
  • Fixed link form padding

  • Fixed add link form on main plugin administration page


  • Added the possibility to add links with an enclosed shortcode

  • Tested and updated for WordPress 5.8.2

  • Fixed classes names to prevend conflicts

  • Allowed protocol relative URLs to be added

* Fixed link import problem when links contain special chars


  • Fixed warning messages on import/export and added some extra checks


  • Added option to reset click statistics


  • Added option to exclude registered users to be counted for click statistics

  • Removed front-end notice for widget api

  • 6.0.8 =

  • Allows same keywords to be added to more links

  • Autocomplete url with https when the protocol is not provided

  • Changed the position of edit buttons when showind advanced options

  • Fixed same link limit issue

  • Fixed linking problems caused by the last plugin update

= 6.0.7
* Added option to disable individual links for showing

  • Fixed warning on permalinks check


  • Added option to set different CSS class for internal links


  • Fixed duplicate content issue


  • Updated and tested to work with WordPress 5.7


  • Added links to settings and main plugin page on plugin list page

  • Fixed PHP 8 related warnings

  • Added price to amazon widget


  • Added option to add disclosure to internal links


  • Enabled statistics to work for cloaked links


  • Added click tracking statistics

  • Fixed warning caused by invalid post id


  • Added option to check if the links are broken


  • Extended support for BudyPress activities

* Fixed breaking shortcodes

  • Prevent adding links when html tags contains brackets

  • Fixed notice issue created by a recent update


  • Added support for MU network activation


  • Added option to prevent adding links in a specific number of paragraphs

  • Added support for WpForo

  • Fixed database warning

  • Fixed CJ form display error


  • Added option to allow linking of part of words or when keywords finish or start with a non-character

  • Limited the number of characters taken into account for automated link generation


  • Added sponsored option for link relation


  • Rebuilt the way links extracted from affiliate networks are displayed

  • Added button to go back to API Management page

  • Updated Amazon category list


  • Added option to add links on category description

  • Added option to add a string or character at the end of each link

  • Fixed amazon products widget display

  • Fixed some problems with Amazon links

  • Fixed Generated Links page

  • Tested and updated to work with WordPress 5.4.1

  • Added an option to force special characters encoding

  • Tested and updated to work with WordPress 5.4

  • Added link to import/export page from main plugin administration page

= 5.8.8
* Added option to exclude posts by tags

  • Fixed exclude categories page

  • Fixed warning on widget display

  • Fixed warning generated by post metabox

  • Fixed cloaked link display on admin page


  • Added button to copy the cloaked link

  • Tested and updated for WordPress 5.3.2

  • Fixed some javascript issues

  • Fixed Amazon link generation error throwing


  • Added option to set custom link limit in each post


  • Added custom option to set limit for each link

  • Fixed show/hide advanced options on link edit form

  • Fixed case sensitive link addition

  • Fixed amazon localization bug

  • Fixed bug dealing with special chars

  • Added a fix to work with Wp Adverts plugin

  • Added capability to work with special chars

  • Fixed a warning generated by last update

  • Fixed heading tags exclusion from replacement


  • Added support for Elementor page builder

  • Added extra sanitization on ajax calls

  • Fixed admin-ajax issue


  • Added option to set the link adding priority


  • Added option to delete all links when importing new file and added warning messages


  • Changed the default value for import/export
  • Tested to work with WordPress 5.2

  • Increased the input field size for amazon api key

  • Enabled keywords to be encapsulated in double quotes

  • Added encapsulation to links exporting

  • Fixed error causing javascript issues

  • Fixed bug making content appear twice


  • Changed the way amazon links are extracted and displayed

  • Added prompt to request Amazon apikey and secret when saving

  • Added support for tablepress

  • Added support for Asgaros Forum

  • Added support for Wp Recipe Maker plugin

* Added instructions on how to obtain Amazon API key and secret


  • Fixed some potential warnings
  • Added fields to set amazon api key and secret

  • Tested and updated to work with WordPress 5.0.2


  • Added a readonly input to show cloaked URL on main links page


  • Added support for PeepSo Social Networking plugin


  • Tested and updated to work with WordPress 5.0

  • Hide advanced options on link edit form

  • Fixed amazon settings updating problems

  • Cleared some notices appearing on widget when no post were displayed

  • Fixed css class display for added links


  • Fixed javascript error when api key was not working and updated some error messages

  • Fixed situation when replacement engine taking into account html in script tags

  • Fixed javascript warning showing on Firefox regarding unreachable code

  • Fixed the amazon product boxes display

  • Prevented Amazon product boxes to appear on text widgets and fixed the display of Amazon product boxes

* Tested and updated to work with the Gutemberg Editor from WordPress 4.9.8


  • Added separate plugin settings for internal links

  • Added confirmation on settings update

  • Fixed redirect loop when links were added without protocol

  • Updated import/export to work with link titles

  • Removed link target if it is internal link

  • Fixed display on Exclude Post page

  • Fixed display on Generated Links page

  • Fixed a warning shown when displaying links in widgets

  • Added a new option for link frequency


  • Changed the way new links are added to prevent problems

  • Tested and updated to work with WordPress 4.9.7

  • Added delete button on recently added links and fixed the default order

  • Fixed warning breaking the headers when content is presented as array

  • Cleared some warnings appearing in combination with advanced custom fields

  • Fixed non-working delete link

  • Removed the auto-completed text from the input after a link is added and the window is not scrolled to bottom any more

  • Improved url checking to see it is links to own url – when used for internal linking

  • Hide pagination on generated links if there is a single page


  • Added pagination to manual generated links

  • Fixed display of active post types selection in General Settings

  • Tested and updated for WordPress 4.9.6

  • Added link to generated links on main plugin page

  • Made generated links page visible for users without API key


  • Added feature to view generated links for each post

  • Fixed link limit problem when article is too big

  • http is automatically added if the entered url has no protocol

  • Updated the remaining links to https

  • Fixed post type settings display

  • Changed the placehorder for new link form and cleared a console message

  • Fixed an error causing a notice to appear, and a warning when no post type is selected

  • Changed link input placeholder to https


  • Changed all links to our homepage to https

  • Fixed a warning showing in exclude category admin page

  • Fixed amazon widget links to show in a new window

  • Fixed generated links page, broken after the widget update

  • Fixed the link placement selection display in general settings


  • Added support for Advanced custom fields

  • Fixed widget not appearing when enough links added

  • Fixed settings checkbox display

  • Fiexed option updating over and over


  • Added support to show products at the bottom of the post. Products from amazon can be displayed at the bottom of the post with a widget

  • Changed the placeholder for title input text

  • Tested and updated for WordPress 4.9.2

  • Fixed notice appearing on widget

  • Added support for events manager plugin

  • When new link is added the window is scrolled to the new link

  • Removed non-working delete icon when new link is added

  • Replaced delete link icon with a button

  • Fixed the way link list sorting actions are displayed


  • Fixed plugin version numbers


  • Added option to choose if replacement is case sensitive or not

  • Tested and updated for WordPress 4.9.1

  • Fixed warnings and updated to work with WordPress 4.9

  • Tested and updated for WordPress 4.8.3

  • Fixed notice appearing when url is not valid

  • Added placeholder to affiliate link input

  • Fixed notice that appeared on random link distribution when the keyword to replace was the last word in post

  • Fixed line spaces in add link form

  • Improved the add link form design


  • Changed the way add new links form is displayed

  • Fixed notice appearing on link class

  • Tested and updated to work with WordPress 4.8.2

  • Changed instructions to reflect latest changes

  • Added activation links for modules on api management page

  • Links are not generated anymore if site is loaded in iframe

  • Changed the name of api management page from “Upgrade to PRO” to “API Management”.


  • Removed apikey check when creating admin menu and removed pro modules entries from main plugin menu

  • Cleared some notices appearing when debug mode is on

  • Limit the maximum number of characters for which random replacement works


  • Implemented random distribution to work when same keyword limit is higher than 2
  • Improved performance for random link distribution

  • Tested and updated for WordPress 4.8.1


  • Improved the add new links interface on main plugin administration page

  • Removed rewrite rules flushing from plugin settings

  • Changed general settings behaviour from ajax to standard submit

  • Added option to choose the desired cloak url query variable

  • Title text input is now hidden by default and included in advanced options


  • Added the possibility to add links on headlines.

  • Tested and updated for WordPress 4.8

  • Preventing links to be added inside code blocks


  • Fixed critical bug that caused content to not be displayed at all

  • Fixed layout on Exclude posts administration page

  • Tested and updated to work with WordPress 4.7.4

  • Fixed undefined variable warning on settings display
  • Removed relation attribute from links to own website

  • If the link target is to own website, it will not be cloaked even if cloaking is set

  • Fixed the rel attribute attribute on automatically added links

  • Fixed some code that generated notices and improved the random link distribution

  • Removed api key check when adding api.js javascript file

  • Changed flush rewrite parameter to soft flush

  • Javascript files moved to footer

  • Tested and updated for WordPress 4.7.3


  • Added option to enable or disable showing links on excerpts

  • Changed from jquery deprecated .live to .on


  • Added the possibility to add links in widget text.


  • Added option to select all clickbank categories

  • Tested and updated for WordPress 4.7.2

  • Tested and updated for WordPress 4.7.1

  • Preventing link to be added inside other links with extra tags

  • Fixed max links in every article bug

  • Checked and tested for wordpress 4.7

  • Changed the order of some settings to make more sense


  • Changed the settings saved alert to a lightbox confirmation

  • Updated the getting started page to reflect latest changes


  • Fixed problems appearing for PHP versions before 5.3


  • Added widget support to show affiliate links in sidebars

  • Cleared some notices that appeared after some recent updates

  • Added verification of blank keywords

  • Links are not displayed in RSS feed anymore

  • Fixed problem when new link is added and the checkbox for mass actions was not displayed

  • Lowered the size of title input for a better view on smaller devices.

  • Added optional placeholder to title entry

  • When there is no title specified, no title is displayed


  • Added the possibility to specify title attribute for each added link


  • Updated the plugin to allow link that does not contain http: or https: to be added, to allow // links or inner linking

  • Updated and checked for WordPress 4.6.1

  • Changed main js script name to avoid conflicts

  • Fixed edit keyword problem

  • Fixed the problem when words with apostrophes were not linked


  • Reactivated Custom Feed module

  • Checked and updated for WordPress 4.6

  • Added button to remove the API key

  • Added an action to be executed before the link engine starts. Using action aal_before_content_display you can programatically change plugin settings from other file, or add some custom code when before links are displayed.


  • Added a filter hook to link addition. You can add a filter to aal_link_display hook and change the way links are displayed.

  • Added more options to same keyword and same link limit

  • Added the cssclass setting to automatically extracted links

  • Fixed some notices appearing on generated links page

  • Added title to Import/Export page and fixed the html

  • Added pages to consideration when keywords are being suggested

  • Displayed metabox on page edit screen

  • Excluded posts table is not displayed if there are no post excluded

  • Changed default value of same keyword to 3

  • Fixed bug when links were not displayed if same keyword was set to No Limit

  • Fixed some Clickbank javascript and default issues

  • Tested for WordPress 4.5.3

  • Fixed same keyword to be displayed twice if it is added more than once

  • Fixed display issues on tables inside plugin admin


  • Added support for BBpress forums

  • Delete plugin options when plugin is uninstalled

  • Fixed css class text input

  • Added extra security check when importing links

  • Prevent notification to be displayed for non-admin users

  • Fixed dbdelta multiple key issue when deactivating and reactivating the plugin

  • Fixed unidentified index problem causing a notice to appear.


  • Added delimiter options for Commission Junction file upload
  • Fixed Commission Junction delete problems

  • Removed code for settings export feature

  • Updated the list of options that are deleted when the plugin is uninstalled

  • Changed required permissions for general settings
  • Fixed potential memory leak in keyword suggestion

  • Tested with WordPress 4.5.2

  • Changed the way settings are added and updated


  • Fixed javascript problem causing warnings in firefox


  • Changed the way replacement is made for big articles
  • Fixed some settings lost when upgrading

  • Changed the redirect code to 303


  • Improved the processing speed for very big posts

  • Tested wth WordPress 4.5.1

  • Removed dashboard notification

  • Minor change to regexp match

  • Added variable check on link import

  • Changed the text shown when no custom link are available.
  • Added on-page instruction to get Commission Junction product feed.

  • Checked and tested for WordPress 4.5


  • Added option to limit the maximum times a link is added

  • Fixed some more errors and notices

  • Fixed some errors and notices

  • When multiple keywords are set for the same link, the limit from Same Keyword Limit will apply to all of the keywords in the group

  • Removed some notices in PHP 7

  • Changed the order of general settings

  • Removed cloaking links warning to prevent confusion.

  • When links are imported, existing links are checked for duplicates

  • Set the autoload to on for plugin settings

  • Changed the way default settings are set at plugin installation

  • Set normal link distribution as default


  • Added option to disable showing links on list pages like category, archives and tag pages.

  • Added experimental support for WP Symposium Pro


  • The plugin replaces links for content displayed with the_excerpt

  • Fixed bug where keywords were turned into lower case

  • Removed API instruction messages if it is already set

  • Preventing API calls when API key is not set

  • Added option in General Settings for link randomization

  • Link additions is randomized for up to 2 entries of the same keyword


  • Link addition is randomized if “Same Keyword” setting is set to 1.

  • Fixed bug when the keyword contains regex special chars and delimiters

  • Removed deprecated ereg_replace function

  • Javascript requests now support https

  • Fixed ajax call to allow both http and https requests

  • If apikey is added, Upgrade to PRO page becomes API Management

  • Changed the look of module management table

  • Prevent plugin from adding affiliate links into script tags

  • Added option to limit repetitive API calls
  • Added option to prevent API request if user overquota

  • Added html_entity_decode to wp_redirect after cloaking

  • Added function to handle setting options saving

  • Fixed keyword count bug


  • Increased the number of posts to get suggestions from
  • Shows count for suggested keywords

  • Changed permissions so Authors won’t see auto affiliate links metabox when writing post

  • Added post count for category exclusions
  • Categories which are excluded are no longer displayed in the drop-down input

  • Fixed some JS function broken by last update


  • Added page to handle category exclusion


  • Reviewed and tested for WordPress 4.4


  • Removed configuration links for modules that are not active

  • Removed unused options from amazon module

  • Changed a short open tag to a normal open tag

  • Provided turnaround for wp ecommerce plugin


  • Fixed problems for

  • Flushing rewrite rules whenever new settings are saved

  • Fixed the problem with dismiss notice link

  • Removed some debug logging from previous versions

  • Fixed problem when updating ebay affiliate ID

  • Fixed compatibility issues with lazy-load plugins

  • Changed the scope of some js variables from global to local to prevent conflicts

  • Fixed youtube video issue

  • Added autoload attribute to “no” for plugin settings saved in wordpress option table

  • Fixed problem not displaying links in budypress while no post was set for exclusion


  • Added support for Buddypress custom profile fields


  • Changed post requests from curl to WP HTTP API

  • Checked and tested for WordPress 4.3.1


  • Changed to PHP 5 style constructors

  • Added table footer to api management table. Rearranged html in generated links table.


  • Fixed problem with insufficient permissions


  • Fixed some code indentation
  • Fixed exclude post by url when duplicate was found
  • Added comments to some blocks of code

  • Changed some input labels and some js error messages


  • For mass actions on affiliate links, now there is the option to mass deselect after mass select


  • Fixed getting started page layout
  • Added option to disable automatic replacement


  • Reviewed and tested for WordPress 4.3


  • Removed activation/deactivation drop-down from modules settings pages


  • Reviewed and tested for WordPress 4.2.4


  • Checked and tested for WordPress 4.2.3


  • Reviewed and fixed security issues

  • Fixed 2 security issues
  • Removed import and export settings features

  • Fixed bug where exclude words was not working in some environments

  • Changed the submit value of the affiliate links from “Edit” to “Update”

  • Added delete option for excluded words

  • Added a new line before plugin content is added


  • Added option to exclude words from automatic linking

  • Added a field for stats in database

  • Added a custom class to all links generated for statistical purposes

  • When suggested keywords are used, the input text will be highlighted.

  • Changed the way clickbank categories are displayed

  • Minor tweak on homepage display

  • Minor fix for some environments

  • Tested for WordPress 4.2.2

  • Removed some …