Auto Link Injection
Auto link injection is AffRank’s core feature. You define keyword → URL pairs in the dashboard. AffRank’s script scans your page content on every load and wraps matching text in affiliate links — automatically, on every page, without touching your HTML.
How it works
- A visitor loads a page on your site
- The AffRank script fetches your active affiliate links
- It scans the visible page text for your configured keywords
- It wraps the first matching instance of each keyword in an affiliate link
- The visitor sees a normal clickable link — your content is otherwise unchanged
Your HTML source is never modified. The injection happens in the browser on each page load.
Keyword matching
AffRank matches keywords as exact phrases, case-insensitive.
| Your keyword | Will match | Won’t match |
|---|---|---|
best web hosting | ”the best web hosting for bloggers" | "best hosting” |
VPN service | ”looking for a VPN service" | "VPN services” |
bluehost | ”I use Bluehost" | "BlueHost Pro” |
Only the first occurrence on each page gets linked. This keeps your pages readable and avoids over-linking.
Google compliance
Every injected link automatically gets:
<a href="YOUR_AFFILIATE_URL" rel="nofollow sponsored noopener" target="_blank"> keyword text</a>rel="sponsored" is Google’s required attribute for paid affiliate links. rel="nofollow" tells search engines not to pass PageRank. Both are applied automatically — you don’t configure anything.
Link settings per keyword
For each affiliate link in your dashboard you can configure:
- Active / Inactive — toggle injection on or off without deleting the link
- Cloaking — serve the link as
/go/your-keywordinstead of exposing the raw affiliate URL (see Link Cloaking)
What pages get links injected?
Any page that loads your AffRank script and contains your keyword in its visible text content. This includes blog posts, product pages, review articles, and landing pages.
Links are not injected into:
- Navigation menus
- Footers
- Sidebars (unless your keyword appears in sidebar text)
- Page titles or
<head>content - Other
<a>tags (AffRank won’t nest links)
Adding and managing links
Go to Affiliate Links in your dashboard to add, edit, activate, or deactivate keyword → URL pairs.
See Managing Affiliate Links for a step-by-step walkthrough.