Affiliate Links and SEO: How to Mark Commercial Links Without Risking Rankings
Table of contents
Affiliate links are the most common way to monetize a blog and also the one that raises the most doubt. The question I get every time is the same: if I mark the link, do I lose rankings? The short answer is no. The long one fits in this article.
Affiliate Links: What a Commercial Link Is and Why It Has to Be Declared
A commercial link is a link that exists because someone pays. It can be a commission on a sale, a cost per click, a flat sponsorship, or a product you were given in exchange for a review with a buying link. In all four cases the link is not there because you picked it as a source: it is there because there is a commercial relationship behind it.
Google does not forbid that. It forbids hiding it. Its spam policy states it plainly: buying and selling links are normal economic activity and are not a violation "as long as they're qualified" with a rel attribute value.
The cases you have to mark
- Advertising or sponsorship embedded in an article.
- A post paid for by a brand.
- An affiliate link to a store or a program, whether that is Amazon, Awin, CJ, Hotmart or a direct deal.
- A review of a product you got for free, with a buying link.
What you do not mark
Ordinary editorial links: the source you cite, the study you read, the tool you use daily. Over-marking has a cost too, because Google uses links to understand the context of a page. The rule I apply: if someone paid or you got paid, mark it; if you added it because it was useful, leave it alone.
The Three rel Values and When Each One Applies
Google documents three values and each one has its own ground. Picking the wrong one is not dramatic, but picking right saves work later.
rel="sponsored": ads, sponsorships, paid links and affiliates. It is the value Google prefers for this case. If you only memorize one, memorize this one.rel="ugc": user-generated content such as comments or forum posts. If your site accepts comments with links, this is the value, not the affiliate one. I cover it in the article on UGC and SEO.rel="nofollow": the fallback when neither of the others applies. It is still acceptable for paid links, thoughsponsoredis preferable. The basics are in the piece on the nofollow attribute, which I wrote a while back and complement with this one.
They can be combined. I use rel="sponsored nofollow" almost everywhere: it covers the modern case and the old one, separated by a space (a comma works too). Two details people forget, both in Google's documentation on qualifying outbound links:
- These attributes only work on
<a>elements Google can crawl. On an image or a form they do nothing. - To avoid following internal links the tool is not
rel: it is thedisallowrule in robots.txt. And to keep a page out of the index you usenoindex; if you are mixing those up, start with meta robots and noindex.
The Link-Juice Myth: Marking Costs You Nothing, Not Marking Does
For years people repeated that nofollow "burns" the authority of a link. That framing went stale in September 2019, when Google announced that all three attributes are hints about which links to consider, not a binary order. Google also said nobody had to rewrite existing nofollows.
What does happen when you do not mark: a manual action for link schemes or a loss of algorithmic trust. It is not automatic and has no fixed timeline, and I will not invent percentages, but it is a real risk you can see in Search Console. The asymmetry is obvious: marking costs nothing; not marking exposes the domain to a review that can cost months. The full map of those reviews is in how to avoid Google penalties.
My rule of thumb: a marked commercial link is declared advertising, and declared advertising is normal business. An unmarked one is an attempt to manipulate, even if that was never your intent.
How to Mark Affiliate Links in Bulk Without Editing Every Post
If you have two hundred posts, opening them one by one is not an option. The pattern that works is to declare at render time, not in the stored HTML: keep a list of affiliate domains and a rule that adds the attribute when the page is served. When you sign a new program, you edit one list instead of two hundred files.
In WordPress that is the the_content filter. This block walks the links and marks the ones pointing at a domain on your list:
add_filter( 'the_content', function ( $html ) {
$domains = array( 'amazon.com', 'amzn.to', 'awin1.com' );
return preg_replace_callback( '#<a\s[^>]*href="https?://([^/"]+)[^"]*"[^>]*>#i',
function ( $m ) use ( $domains ) {
foreach ( $domains as $d ) {
if ( str_contains( $m[1], $d ) ) {
return str_replace( '<a ', '<a rel="sponsored nofollow" ', $m[0] );
}
}
return $m[0];
}, $html );
} );
On your own templates the equivalent is a helper or component: an affiliate_link() function that takes the URL and decides whether to add the attribute.
One warning that saves trouble: if the rel is only added by JavaScript in the browser, it does nothing. Google reads the rendered HTML and many third-party crawlers do not execute scripts. It is the same rendering problem: what is not in the served HTML does not exist for many bots.
Verification takes a second: fetch the URL with curl and look for the attribute in what the server returns, not in the browser inspector.
curl -s https://your-domain.com/article | grep -o '<a [^>]*amazon[^>]*>'
The Other Half: Thin Affiliate Pages
Marking the link solves half the problem. The other half is the page. The spam policy has its own section for this, thin affiliate pages, and the wording is so specific it needs no translation: publishing affiliate content where "the product descriptions and reviews are copied directly from the original merchant without any original content or added value".
The counterweight sits on the same page: "Not all sites that participate in affiliate programs are considered thin affiliates". Google lists what it does accept: additional pricing information, original reviews, rigorous testing, category navigation and comparisons. The description copied from the store does not compete; the comparison with your own criteria does.
It is the same axis as the demonstrable experience in E-E-A-T: if you used the product, say so; if you did not, do not fake it. And if your problem is a description duplicated from a supplier feed, that is scraped and copied content, a different problem with its own fix.
Own Redirects, Disclosure, and What Not to Do
Links such as /go/product or tracking subdomains are normal: they measure clicks and let you switch programs without touching content. But the final destination is still commercial and has to be declared all the same. Your own redirect does not turn an affiliate link into an editorial one.
Visible disclosure is part of the deal, and not only because of advertising rules: Google's site reputation policy explicitly lists "affiliate links used on a page, treated appropriately" as a legitimate use. One line above the block is enough.
What not to do: hide the link behind a misleading shortener, write anchor text that mimics an internal editorial link when it points to a store, or publish affiliate articles with no byline and no editorial owner. That last case is literally the example Google gives as a candidate for action in its reputation policy, the same one I explain in parasite SEO and site reputation. If the anchor worries you, review the best practices for anchor text.
Auditing Commercial Links in Four Steps
- Inventory: fetch a sample of URLs with curl and look for affiliate domains in the served HTML. Note which
relthey carry today. - Templates: if the problem shows up across many posts at once, the source is the theme or an auto-insertion plugin, not the content.
- Search Console: the links report shows which domains repeat and with what patterns. The method is in how to audit your backlinks.
- Calendar: a quarterly review and one every time you sign a new program. It fits inside an editorial calendar.
Seven-Point Checklist
- Every paid link carries
rel="sponsored"orrel="nofollow". - The attribute is in the served HTML, not only applied by JavaScript.
- Comments and forums use
rel="ugc". - Editorial links stay unmarked.
- Disclosure is visible next to the block or at the top of the article.
- The page adds something of its own: comparison, testing, pricing, criteria.
- Authorship and an editorial owner are identifiable.
Hit all seven and you can earn commissions without gambling your domain. Marking a link does not cost you rankings: it removes the risk.