Your coupon button can look like an ordinary internal link while sending a shopper through an affiliate network. A route such as /go/482 tells you where the click enters your script; it doesn’t explain the commercial relationship. That’s the job of rel sponsored markup on the link the shopper clicks.
The practical rule: qualify the original HTML anchor, even when its destination is your own redirect handler. Then treat redirect security, crawler access and customer disclosures as separate jobs. None replaces the others.
With couponPHP, a self-hosted PHP coupon and deal website script, the same policy needs to cover manually added coupons and affiliate imports. A shared rendering template is a better control point than an editor’s memory. The routes and data fields below are illustrative, not product-specific settings.
rel sponsored vs nofollow vs ugc: which describes your link?
Say a Leeds coupon site publishes a paid featured offer, a reader’s comment and an unpaid delivery guide. Giving every link the same attribute erases distinctions that matter. But leaving everything unqualified makes paid placements look like independent editorial recommendations.
The history explains the choices. Nofollow emerged in 2005 to address comment spam. Wikipedia dates Google’s announcement of sponsored and ugc to September 10, 2019; the new values describe compensation and user contributions more precisely.[1]
Your link policy can follow the relationship:
rel="sponsored"identifies advertising, sponsorship or another compensation arrangement. An affiliate link belongs here because a qualifying transaction can earn you commission, even if today’s clicks earn nothing.rel="ugc"identifies user-generated content, such as a reader’s comment containing a shop link. It doesn’t describe payment by itself.rel="nofollow"indicates nonendorsement or a commercial relationship under the HTML standard. It’s useful alongside a more specific value, or where you don’t want to endorse an otherwise unclassified destination.[2]- An ordinary editorial link can have no qualifying value. Your category navigation doesn’t become sponsored because some coupons elsewhere earn commission.
A rel sponsored label describes the paid relationship; it doesn’t certify an offer’s quality or make misleading copy acceptable. Editorial approval and monetization are separate decisions. A carefully checked affiliate offer is still commercial.
These annotations aren’t guaranteed crawl barriers. Google began treating nofollow as a hint for crawling and indexing on March 1, 2020, according to Wikipedia’s account.[1] You’ll need a separate crawl policy if unwanted redirect requests are the problem. Our affiliate SEO guide covers the wider content and site-structure decisions that link attributes don’t resolve.
Put the attribute before the PHP redirect
A developer might qualify a merchant link on an intermediate page but leave the original “Get deal” button untouched. That misses the link users encounter first. Another template might send clicks through /go/482, then through a network tracker, before reaching the merchant.
The original anchor should describe that paid journey:
<a href="/go/482" rel="sponsored nofollow">Get deal</a>
The same rule applies to an outgoing click URL such as /out.php?id=482. A local hostname doesn’t turn an affiliate click into ordinary site navigation. If you link directly to the network instead, the qualification still belongs on that anchor.
For a PHP template, derive the values from offer metadata rather than asking editors to type HTML. This example assumes your application has already populated the fields from trusted records:
<?php
$rel = [];
if ($offer['earns_commission'] || $offer['paid_placement']) {
$rel[] = 'sponsored';
$rel[] = 'nofollow'; // Optional compatibility choice.
}
if ($offer['submitted_by_user']) {
$rel[] = 'ugc';
}
$href = '/go/' . (int) $offer['id'];
?>
<a href="<?= htmlspecialchars($href, ENT_QUOTES, 'UTF-8') ?>"
<?php if ($rel): ?>
rel="<?= htmlspecialchars(implode(' ', $rel), ENT_QUOTES, 'UTF-8') ?>"
<?php endif; ?>>View deal</a>
This keeps the decision in one place and escapes attribute output. The optional nofollow value preserves a broader annotation alongside sponsored. If your policy uses sponsored alone for paid links, that extra value isn’t required to describe the compensation.
You’ll need a dependable source for those flags. An affiliate import integration should map monetization status into your records; an editor should mark a directly sold placement. Checking whether a URL contains a familiar network hostname isn’t enough, because direct merchant links can also be commission-bearing.
The outgoing handler has a different responsibility. It can record the request and redirect to the stored affiliate destination. Resolving an offer ID to an approved destination is safer than accepting any visitor-supplied url parameter, which could let strangers redirect people to unrelated sites. Changing the handler’s response won’t add a missing attribute to the original page.
Combine values without overwriting existing attributes
A reader may submit a deal that your site later monetizes. Marking it only as user-generated loses the compensation information; replacing ugc with sponsored loses the contribution information. You can retain both.
The HTML Living Standard defines rel as a set of unique, space-separated tokens.[2] Spaces are the right separator for portable HTML:
<a href="/go/482" rel="ugc sponsored nofollow">View submitted deal</a>
Order doesn’t change the meaning. A single rel attribute should contain the applicable values; adding a second attribute isn’t a way to combine them. For an ordinary unmonetized comment link, ugc nofollow can express contribution and nonendorsement without claiming sponsorship.
Browser-security values serve another purpose. If your template opens a new tab and already uses noopener, keep it when adding the commercial qualification:
<a href="/go/482" target="_blank"
rel="sponsored nofollow noopener">Open offer</a>
Neither noopener nor noreferrer substitutes for sponsored. The standard says noreferrer suppresses the browser’s Referer header and also provides noopener behavior.[2] Don’t add it as an SEO fix: suppressing referrer information is a separate privacy decision that deserves its own tracking checks.
Should robots.txt block your outgoing click paths?
A coupon site may record crawler requests to /go/ as if they were shopper clicks. Blocking that route can reduce requests from compliant crawlers. It cannot tell a search engine why the links are paid.
The IETF’s RFC 9309, published in September 2022, defines robots.txt rules for crawler access and explicitly states that they aren’t access authorization.[3] For a dedicated redirect directory, a possible rule is:
User-agent: *
Disallow: /go/
This assumes /go/ contains outgoing handlers, not useful store pages. Add the rule to the appropriate group in your existing file rather than replacing unrelated rules. More specific crawler groups may need their own treatment. And /go/ doesn’t cover a separate route such as /out.php; your rule must match the route you actually use.
There’s a trade-off. A compliant crawler blocked from fetching the redirect can’t inspect that response to discover its destination. Keep the coupon page accessible and qualify its source anchor anyway. Don’t depend on the redirect to explain the relationship.
Robots exclusion governs fetching, not guaranteed removal from search results. It also won’t stop every bot or protect a private destination. You’ll still need request filtering if your affiliate performance metrics count automated traffic. Avoid blocking store or category pages just because they contain affiliate buttons; those pages can have useful content independent of their outgoing handlers.
Catch missing markup where shoppers actually click
A desktop coupon card can be correct while the mobile popup loses its rel value. A theme update can fix “View deal” but leave a linked merchant logo unchanged. Testing one button isn’t enough.
A useful release check follows the different rendering paths:
- Inspect the original page HTML for a paid offer’s outgoing anchor, then inspect the popup’s rendered anchor if it is created later.
- Compare a manual offer with an imported offer. Both should receive the commercial qualification when their records indicate compensation.
- Check a reader-submitted monetized deal and an unpaid editorial link. Their values should differ because their relationships differ.
- Follow the redirect in the browser’s network panel. Confirm the approved destination and tracking parameters survive without treating that successful click as proof of correct markup.
A JavaScript-only click handler gives you no anchor on which to place rel. Where possible, a real anchor preserves normal link behavior while your script adds click reporting or a code-copy action.
There’s also a visible-content check. A correctly qualified button still leaves readers unaware of commissions if your disclosure is hidden. The FTC’s guidance accompanying its 2023 Endorsement Guides calls for clear, conspicuous affiliate disclosures and warns that “affiliate link” alone may not communicate payment.[4] A nearby sentence such as “We may earn a commission if you buy through these links” explains the arrangement. Our affiliate disclosure guide covers placement; hidden HTML isn’t a substitute.
Frequently asked questions
Older templates and mixed editorial workflows raise recurring questions. For example, an existing nofollow button may work correctly while its replacement silently drops the annotation.
Can I keep nofollow on existing affiliate links?
Yes. Nofollow still describes links included because of a commercial relationship under the HTML standard.[2] Sponsored gives a more specific description, and you can combine them. Adding sponsored alongside an existing nofollow value is a reasonable migration choice. You don’t need to label unrelated editorial links as paid just because the same site also publishes affiliate offers. Scope the change to the relevant links.
Where does sponsored go if my link uses a PHP redirect?
It belongs in the original HTML anchor’s rel attribute, including when href points to /go/482. The handler determines the next destination; it doesn’t rewrite the original page’s link attributes. Shared rendering code helps coupon cards and popup buttons describe the same paid relationship. If you change outgoing routes, the qualification should remain attached to the anchor rather than depend on the old URL pattern.
Should I block outgoing affiliate URLs in robots.txt?
You can block a dedicated redirect path when you want compliant crawlers to avoid fetching it. That won’t replace sponsored on the source link, guarantee removal from search results or stop bots that ignore robots.txt. First confirm that the path doesn’t contain useful content. Then keep the coupon page itself available so crawlers can read its content and qualified links.
Will sponsored stop affiliate tracking or replace a disclosure?
Sponsored doesn’t rewrite href or disable normal browser navigation. It doesn’t itself remove tracking parameters, although successful attribution still depends on your affiliate setup. It also doesn’t display a commission notice to readers. Treat markup, click testing and visible disclosure as separate checks. A working network redirect tells you nothing about whether a shopper understood your financial relationship before clicking.
Make the link policy survive your next template change
An editor can fix today’s button and still miss tomorrow’s imported coupon. A rel sponsored policy should live where your application renders links, backed by offer data that distinguishes compensation from user contribution.
After the next theme or importer update, test a paid offer through every clickable version of its card. The detail that matters is the original anchor: it should keep its qualification even when the route, popup or merchant destination changes.
