Check 18.18 · Off-page, backlinks and brand awareness

Use rel=sponsored for paid links

Qualify every paid, affiliate or free-product link with rel=sponsored, with the code for WordPress, Shopify, Drupal, Laravel and Next.js.

Priority
Important
Difficulty
Easy
Estimated time
1 to 3 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

The rel="sponsored" attribute tells search engines that a link exists in return for compensation: advertising, sponsored article, affiliation, free product. It goes on the <a> tag. Once the check is done, every paid link your site publishes carries it, and every link you pay for elsewhere is published with it.

Why it matters

Google uses links to assess the popularity of pages. A paid link says nothing about the quality of the linked page: if it passed popularity, it would distort rankings. Google's spam policies therefore classify links bought for ranking purposes as link spam, while specifying that advertising and sponsorship are a normal part of the web as long as the links carry rel="sponsored" or rel="nofollow".

Google introduced sponsored and ugc on September 10, 2019. Since then, all three values have been treated as hints: Google takes them into account when deciding which links to consider, with no guarantee that the linked page will not be crawled through another path. For paid links, sponsored is the recommended value; nofollow is still accepted and there is no need to change older links that carry it.

The risk applies both ways:

  • Your site sells or publishes paid links without qualifying them: Google can apply an “Unnatural links from your site” manual action.
  • Your site buys unqualified links elsewhere: possible manual action on your site, or automatic neutralization of the links.

What it improves

  • Compliance with Google's and Bing's rules No more risk of a manual action for paid links.
  • Transparency Combined with a visible disclosure, the attribute complements the obligation to identify advertising. See identify sponsored and affiliate content (opens in a new tab).
  • Link profile clarity Your paid links are kept separate from your editorial links.
  • Rankings No gain. A sponsored link does not pass popularity; the aim is to avoid a loss.
  • Generative engines Undocumented effect. AI assistants read visible text; it is the “sponsored” label that informs them, not the attribute.

How to check

On a page, in the console of the browser's developer tools:

console.table(
  [...document.querySelectorAll('a[href^="http"]')]
    .filter((link) => link.host !== location.host)
    .map((link) => ({ lien: link.href, rel: link.rel || '(aucun)' }))
);

Every paid or affiliate link must show sponsored (or nofollow) in the rel column; (aucun) means none.

From the command line, to count unqualified links to an advertiser:

curl -s https://example.com/article-sponsorise/ \
  | grep -o -i -E '<a [^>]*href="https?://(www\.)?annonceur\.example[^"]*"[^>]*>' \
  | grep -v -c -i -E 'sponsored|nofollow'

The expected result is 0.

Across the whole site, run a crawl with Screaming Frog and export all outlinks: the export shows, for each link, whether it is followed and the value of its rel attribute. Filter on the domains of your advertisers and affiliate programs.

For links you have paid for elsewhere, run the curl command on each publication URL, with your own domain in the pattern.

How to implement

Before you start

Which links to qualify. Any link that exists because of something given in return, whatever its form:

Situation Value
Banner or advertising link sold directly sponsored
Sponsored article, advertorial, branded content sponsored on the links to the advertiser
Affiliate link (commission on sales) sponsored
Review of a product given or lent, with a link to the brand sponsored
Sponsorship of an event or an association, logo with a link sponsored
Paid listing in a directory you publish sponsored
Link in a comment or a forum post ugc (see use rel=ugc if relevant (opens in a new tab))
Editorial link to a source, with nothing in return No attribute

Syntax. Values can be combined, separated by spaces: rel="sponsored noopener". A paid link posted by a user can carry rel="sponsored ugc".

<a href="https://annonceur.example/offre" rel="sponsored">See our partner's offer</a>

Affiliate redirect links (/go/produit): put rel="sponsored" on the link that points to the redirect. Many publishers also block the redirect directory in robots.txt (Disallow: /go/); this is a convention, not a requirement.

Ads loaded in JavaScript by an ad network (Google AdSense, Ad Manager): the network handles its own links, there is nothing for you to do.

Links you buy: have the attribute written into the purchase order. Possible wording: “Any link to the client's site published as part of this partnership carries the rel="sponsored" attribute and the content is labeled as sponsored.”

Good to know: do not add sponsored to your editorial links as a precaution. A link to a source you cite freely must remain a normal link.

WordPress

Versions WordPress 6.2 to 7.1 (block editor and classic editor).

Link by link: in the block editor, select the block, open the options menu (three vertical dots), choose “Edit as HTML”, then add rel="sponsored" to the <a> tag. Return to visual mode with “Edit visually”. In the classic editor, use the “Text” tab. Some SEO or affiliate link management plugins add a “sponsored” checkbox to the link panel: check the documentation for your version.

For all external links in sponsored posts: create a sponsorise category, then add this filter in a small plugin or in a child theme's functions.php (WordPress 6.2 or later):

<?php
add_filter('the_content', function (string $content): string {
    if (! in_the_loop() || ! has_category('sponsorise')) {
        return $content;
    }

    $siteHost = wp_parse_url(home_url(), PHP_URL_HOST);

    $processor = new WP_HTML_Tag_Processor($content);

    while ($processor->next_tag('a')) {
        $host = wp_parse_url((string) $processor->get_attribute('href'), PHP_URL_HOST);

        if (! $host || $host === $siteHost) {
            continue;
        }

        $rel = trim((string) $processor->get_attribute('rel'));

        if (str_contains($rel, 'sponsored')) {
            continue;
        }

        $processor->set_attribute('rel', trim("{$rel} sponsored"));
    }

    return $processor->get_updated_html();
});

For affiliate links present in all content, the per-domain variant is given in the check identify sponsored and affiliate content (opens in a new tab). Affiliate link management plugins that create redirect URLs usually offer a global “sponsored” option: turn it on rather than qualifying each link.

Widgets and banners: in a Custom HTML block, write the attribute directly into the banner's code.

Clear the page cache (cache plugin, CDN), then run the console test again.

Shopify

Versions Shopify admin and Online Store 2.0 themes, all plans, November 2026.

In a blog post or a page, the rich text editor does not offer a rel attribute. Click the editor's show HTML button (<> icon) and add rel="sponsored" to the <a> tag.

For a theme section that displays paid partners' logos, edit its Liquid file (Online Store > Themes > … > Edit code, sections folder):

{% for block in section.blocks %}
  <a href="{{ block.settings.link }}" rel="sponsored noopener">
    {{ block.settings.logo | image_url: width: 240 | image_tag: alt: block.settings.name }}
  </a>
{% endfor %}

Duplicate the theme before any code change, then check the preview.

Drupal

Versions Drupal 10 and 11 (CKEditor 5); Editor Advanced Link module 2.2 and 2.3.

With CKEditor 5, the rel field cannot be edited by default. Two options:

  • Editing the source code: Configuration > Content authoring > Text formats and editors (/admin/config/content/formats), edit the format in use, enable the “Source” button and add <a rel> to the manually editable HTML tags. Editors write the attribute in the source code.
  • Editor Advanced Link contributed module: it adds attribute fields, including rel, to the link dialog. Use the 2.3 branch for Drupal 10.5 or 11.2 and later, and the 2.2 branch for earlier versions.

If the “Limit allowed HTML tags” filter is enabled with the Add rel="nofollow" to all links option, be aware that it replaces the rel attribute of every link with nofollow: your sponsored values would be overwritten, which is still compliant but erases the distinction. Clear the caches with drush cr.

Laravel

Versions Laravel 11 to 13, with league/commonmark 2.x.

For content written in Markdown and converted with Str::markdown() (league/commonmark), add an extension that qualifies links to the domains declared as paid. Declare them in config/services.php:

'sponsored_links' => [
    'hosts' => ['annonceur.example', 'www.amazon.fr', 'amzn.to'],
],
<?php

namespace App\Markdown;

use League\CommonMark\Environment\EnvironmentBuilderInterface;
use League\CommonMark\Event\DocumentParsedEvent;
use League\CommonMark\Extension\CommonMark\Node\Inline\Link;
use League\CommonMark\Extension\ExtensionInterface;

class SponsoredLinksExtension implements ExtensionInterface
{
    public function register(EnvironmentBuilderInterface $environment): void
    {
        $environment->addEventListener(DocumentParsedEvent::class, function (DocumentParsedEvent $event): void {
            $sponsoredHosts = config('services.sponsored_links.hosts', []);

            foreach ($event->getDocument()->iterator() as $node) {
                if (! $node instanceof Link) {
                    continue;
                }

                $host = parse_url($node->getUrl(), PHP_URL_HOST);

                if (! in_array($host, $sponsoredHosts, true)) {
                    continue;
                }

                $node->data->append('attributes/rel', 'sponsored');
            }
        });
    }
}
$html = Str::markdown($post->body, [], [new SponsoredLinksExtension()]);

In Blade views, create a component for paid links so you never forget the attribute:

{{-- resources/views/components/sponsored-link.blade.php --}}
@props(['href'])

<a href="{{ $href }}" rel="sponsored noopener" {{ $attributes }}>{{ $slot }}</a>

Usage: <x-sponsored-link href="https://annonceur.example">Our partner</x-sponsored-link>. If pages are cached (php artisan view:clear, php artisan cache:clear or HTTP cache), purge the cache.

Next.js

Versions Next.js 15 and 16 (App Router and Pages Router); rehype-external-links 3.

Create a dedicated component and use it wherever a link is paid:

// components/SponsoredLink.tsx
import type { ReactNode } from 'react';

export function SponsoredLink({ href, children }: { href: string; children: ReactNode }) {
  return (
    <a href={href} rel="sponsored noopener">
      {children}
    </a>
  );
}

For Markdown or MDX, the rehype-external-links plugin qualifies links according to a test:

import rehypeExternalLinks from 'rehype-external-links';

const sponsoredHosts = ['annonceur.example', 'www.amazon.fr', 'amzn.to'];

export const rehypePlugins = [
  [
    rehypeExternalLinks,
    {
      rel: ['sponsored'],
      test: (element: { properties?: { href?: unknown } }) => {
        const href = String(element.properties?.href ?? '');

        return href.startsWith('http') && sponsoredHosts.includes(new URL(href).host);
      },
    },
  ],
];

Do not use next/link for a paid outbound link: that component is meant for internal navigation. After deployment, check the rendered HTML with the curl command from the “How to check” section.

Common mistakes

  • Qualifying the link but not the content: the attribute does not replace the visible “sponsored” or “paid link” disclosure required for the reader.
  • Forgetting links obtained in return for a free product: Google explicitly lists them among paid links.
  • Putting sponsored on every outbound link: your editorial sources become indistinguishable from your ads.
  • Negotiating a more expensive link “with no attribute” with a media outlet: that is buying a link that breaches Google's policies.
  • Filters that overwrite the attribute: a global nofollow setting or an HTML sanitizer that strips rel undoes your work. Check the final HTML, not the editor.
  • Checking only the article: paid links also live in footers, partner pages, archived newsletters and widgets.

Frequently asked questions

What is the difference between rel="sponsored" and rel="nofollow"?

rel="sponsored" specifically marks an advertising, paid or affiliate link; rel="nofollow" is the generic value for a link you do not want associated with your site when no other value fits. For paid links, Google recommends sponsored and still accepts nofollow. Both prevent the link from being counted as a vote of confidence, and there is no need to change older paid links already marked nofollow.

Can you combine several values in the rel attribute?

Yes, the rel attribute accepts several values separated by spaces, and Google also accepts commas. A paid link that opens in a new tab can carry rel="sponsored noopener", and a paid link posted by a user rel="sponsored ugc". Google also states that a single link can carry both ugc and sponsored.

Updated on

Topic checklist (PDF)

And now?

In the “Off-page, backlinks and brand awareness” topic

  1. Audit backlinks and referring domains
  2. Assess topical relevance and quality
  3. Analyze competitor backlinks
  4. Identify editorial opportunities
  5. Identify lost links
  6. Reclaim broken links
  7. Turn legitimate mentions into links where possible
  8. Build press relations
  9. Publish studies and reference resources
  10. Create free tools and useful infographics
  11. Develop industry partnerships
  12. Take part in interviews and podcasts
  13. Earn specialized citations
  14. Use legitimate professional directories
  15. Raise the profile of your experts
  16. Track new referring domains and unlinked mentions
  17. Avoid PBNs, manipulative paid links and excessive link exchanges
  18. Use rel=sponsored for paid links
  19. Use rel=ugc if relevant
  20. Reserve disavowal for justified cases