scalpel@labs: ~/glossary/rel-ugc-link.mdx5 sections

UGC Links

rel="ugc" is a link attribute Google introduced in September 2019 to mark links embedded in user-generated content: blog comments, forum posts, guestbook entries. It signals the site owner didn't author or vet the linked content.

extension: Scalpel SEOupdated: 2026-08-14read_time: 3 min
less rel-ugc-link.mdx

Why it matters

Comment sections and forums are prime targets for link spam. rel="ugc" lets Google discount those links without you manually nofollow-ing every single comment or closing comments entirely. Most CMS comment plugins (WordPress included) apply this automatically. Your job is confirming it's actually working, not hand-tagging each link.

With ugc as a separate tag, you can be more lenient with comments. You're not saying "don't follow this," you're saying "this is user-generated, weigh it separately." It's a transparent signal, not a restriction.

How it works

When a visitor leaves a comment with a link, you have three options:

  1. Strip the link entirely.
  2. Add rel="nofollow" to prevent it counting as an endorsement.
  3. Add rel="ugc" to flag it as user-generated and let Google evaluate it on merit.

Google prefers option 3. The tag says: "this link came from a user, not me, so treat it as possibly interesting but unvetted." Google's crawler may follow ugc-marked links and pass signal, but it knows not to treat them as editorial endorsement.

Most modern comment systems do this automatically:

  1. A visitor submits a comment with a link.
  2. The CMS or comment plugin automatically adds rel="ugc".
  3. Google's crawler sees the tag and queues the comment link.
  4. Google evaluates the destination and decides whether to crawl or pass signal.

The key: ugc is not a block. It's classification. If Google's crawler finds the link useful and trustworthy, it may crawl it and pass ranking signal. If it looks like spam, the ugc tag doesn't stop Google from ignoring it; Google ignores spam either way.

What does not matter

Adding rel="ugc" to a link doesn't guarantee zero ranking value. Google may still evaluate and trust the destination if it looks credible. The tag just tells Google to weigh it differently than an editorial link from you.

Also: ugc is not a substitute for moderation. If your comment section is full of spam, no rel attribute fixes it. Moderation (deleting obvious spam, flagging suspicious patterns) is still the first defence. The rel attribute is for honest user content you trust enough to publish but don't want to personally endorse.

Code example

Here's how to apply rel="ugc" to comment links automatically:

<!-- Bad: comment link with no rel attribute -->
<a href="https://example-site.com">Check this out</a>

<!-- Good: comment link with rel="ugc" -->
<a href="https://example-site.com" rel="ugc">Check this out</a>

In a comment-processing system:

// Process a comment and auto-add rel="ugc" to all links
const processComment = (commentHTML) => {
  const temp = document.createElement('div');
  temp.innerHTML = commentHTML;
  
  // Find all links in the comment
  temp.querySelectorAll('a[href]').forEach(link => {
    const currentRel = link.getAttribute('rel') || '';
    
    // Add "ugc" if it's not already there
    if (!currentRel.includes('ugc')) {
      link.setAttribute('rel', currentRel + ' ugc'.trim());
    }
  });
  
  return temp.innerHTML;
};

// Example: process a user comment
const userComment = '<p>Great post! See <a href="https://my-site.example.com">my related article</a></p>';
const processed = processComment(userComment);
// Result: rel="ugc" automatically added to the link

If you're on WordPress, the comment form already applies rel="ugc" to links in comments by default (as of WordPress 5.3). For custom comment systems or forums, add this step to ensure every user-generated link gets tagged.

How Scalpel shows it

The Links tab displays all ugc-marked links found on the page, separating them from nofollow and sponsored links. For each ugc link, it shows the source (which comment or forum post), the destination URL, and anchor text. Scalpel flags ugc-marked links that appear in site-authored content (a sign the tag was applied too broadly) and highlights user links to low-quality or spam domains so you can decide whether to delete the comment. The extension also confirms that your comment system is actually applying the ugc tag to new comments, not silently stripping links or forgetting the attribute.

Sources