usdigitalmarketingindex.com SEO
How should sponsored and affiliate outgoing links be marked in HTML?
Updated November 15, 2026
With a rel attribute on the link’s anchor element: rel="sponsored" for links that are advertisements or paid placements, which includes affiliate links, and rel="ugc" for links inside content that users posted. Google’s guidance states the first rule directly: “Mark links that are advertisements or paid placements (commonly called paid links) with the sponsored value” (Google’s guidance on qualifying outbound links). The older nofollow value remains acceptable for paid links, and the values can be combined. The attribute describes the relationship to search engines. It does not change the commercial arrangement, and it is not the disclosure that readers are owed.
sponsored, nofollow and ugc meanings
The three values, as Google’s guidance describes them:
| Value | Use for | Wording in the guidance |
|---|---|---|
| <!–INLINECODE4–> | Advertisements and paid placements | "Mark links that are advertisements or paid placements" |
| <!–INLINECODE5–> | Links in comments, forum posts, and other user-generated content | "We recommend marking user-generated content (UGC) links, such as comments and forum posts, with the ugc value" |
| <!–INLINECODE6–> | Cases where the other values do not apply and you would prefer not to be associated with the linked page | "Use the nofollow value when other values don't apply" |
Three further points from the same page:
- On paid links and
nofollow: it “was previously recommended for these types of links and is still an acceptable way to flag them, though sponsored is preferred”. - On ordinary links: “you don’t need to add a rel attribute” for regular links you expect Google to fetch without qualification.
- On effect: links marked with these values “will generally not be followed”, though the linked pages may still be found and crawled through other routes.
Affiliate links are addressed in a separate Google post from July 2021. It says “In general, using affiliate links to monetize a website is fine”, and asks sites in affiliate programs to qualify those links with rel="sponsored", whether the links were created manually or dynamically (Google’s 2021 post on link tagging and link spam).
An editorial link to a source, given freely, needs none of these.
These values are documented for links that leave the site. Putting nofollow on a site’s own internal links is a different matter, with consequences for crawling, covered in the guide to the crawl implications of placing nofollow on internal links.
Code examples
A paid placement or advertisement:
<a rel="sponsored" href="https://www.example.com/product/">Example boiler cover plan</a>
An affiliate link, where the site earns a commission:
<a rel="sponsored" href="https://shop.example.net/item?aff=1234">Example thermostat T200</a>
A link in a user’s comment:
<a rel="ugc" href="https://forum.example.org/thread/88">my earlier post</a>
A link you do not wish to endorse, where neither of the above applies:
<a rel="nofollow" href="https://www.example.org/claim/">the page making this claim</a>
Values combined. The guidance allows “multiple rel values as a space- or comma-separated list”:
<a rel="sponsored nofollow" href="https://www.example.com/offer/">Example offer</a>
<a rel="ugc nofollow" href="https://www.example.org/">a site a commenter linked</a>
Combined with values that have other purposes, which browsers use and which are unrelated to search:
<a rel="sponsored noopener" target="_blank" href="https://www.example.com/offer/">Example offer</a>
Points of syntax:
relgoes on theaelement, not on a surrounding paragraph or container.- Values are separated by spaces, as in the examples here; the guidance also accepts commas.
noopenerandnoreferrerconcern browser behavior and do not qualify a link for search engines.- A link inserted by JavaScript should carry the attribute in the rendered page.
- An image that is a paid link takes the attribute on the
aelement wrapping it.
Site policy and automation
Write the rule down, then make the system apply it.
| Link type | Rule | How applied |
|---|---|---|
| Affiliate links | <!–INLINECODE14–> | Automatically, by matching affiliate domains or link patterns |
| Display and text advertisements | <!–INLINECODE15–> | In the ad template |
| Sponsored articles | <!–INLINECODE16–> on links to the sponsor | A "sponsored" flag on the article that the template reads |
| Comments, forum posts, profiles | <!–INLINECODE17–> | In the comment and forum templates |
| Product review samples received free | <!–INLINECODE18–> on links to the supplier | Editorial checklist |
| Editorial links to sources | None | Default |
| Links to pages the site does not vouch for | <!–INLINECODE19–> | Editor's choice, per link |
Automation prevents omissions. Affiliate links are added by different authors over time, and a rule that depends on each author remembering is fragile. Pattern-based rules in the template or a link-management plugin apply the attribute to every matching link, including old ones.
Avoid the opposite error as well. Applying nofollow to every outbound link on the site, including citations of genuine sources, is not required by the guidance, which reserves qualification for specific kinds of links.
The reader’s side is separate. A rel value is invisible on the page. Advertising and consumer protection rules in the relevant country govern how sponsored content and affiliate relationships are disclosed to readers, for instance by a clear visible statement, and this guide does not set those rules out. Marking the link does not disclose the relationship to a reader, and a visible disclosure does not qualify the link.
Auditing implementation
- List outbound links by destination domain, from a crawl of the site.
- Flag domains that are affiliate networks, merchants with affiliate parameters, advertisers, and sponsors.
- For each flagged link, read the
relvalue in the rendered HTML. - Check user-generated areas: open a page with comments and inspect a commenter’s link.
- Check sponsored articles against the commercial team’s list of paid content.
- Test one of each link type after any template or plugin change.
An audit table:
| Check | Pass condition |
|---|---|
| Affiliate links | All carry <!–INLINECODE23–> (or <!–INLINECODE24–>) |
| Paid placements | All carry <!–INLINECODE25–> (or <!–INLINECODE26–>) |
| UGC links | All carry <!–INLINECODE27–> |
| Attribute location | On the <!–INLINECODE28–> element |
| Rendered output | Present after scripts run |
| Editorial links | Not qualified without a reason |
| Old content | Covered by the rule, not only new posts |
| Visible disclosure | Present where required, checked separately |
A sample of findings worth acting on: affiliate links in articles published before the rule existed; a redirect script on the site’s own domain that hides the affiliate destination, where the link to the redirect still needs the attribute; and widgets supplied by partners that insert unqualified links.
Google’s spam policies explain why this matters (Google’s spam policies). They list “Buying or selling links for ranking purposes” as link spam, and state that links bought for advertising and sponsorship are not a violation when they are qualified with a nofollow or sponsored value. The attribute is what places a paid link on the permitted side of that line.
Deciding whether a link is paid in the first place, particularly for PR coverage and contributed articles, is covered in the guide to what distinguishes earned digital PR links from links purchased as placements.
The rule: if money, goods, or commission is behind a link, mark it sponsored; if a user posted it, mark it ugc; and disclose to readers separately.
Add your comment to this answer