How rel=nofollow, ugc, and sponsored attributes work
guide // , 5 min read, by Darthwares
The rel attribute values nofollow, ugc, and sponsored qualify the relationship between your website and an outbound link. Adding these attributes to anchor tags tells search engines how to handle link evaluation, crawling, and endorsement for user content or advertisements. Google documents that qualifying outbound links prevents policy violations associated with paid placements and untrusted user contributions while communicating semantic relationships to search crawlers.
On this page // 6 sections
- 01What is the rel attribute in HTML?
- 02When should you use nofollow, ugc, and sponsored attributes?
- 03How do search engines process link attributes and handle crawling?
- 04Why is qualifying links important for Google link spam policies?
- 05How do you inspect and audit link attributes on your site?
- 06Common questions
The short version
- The rel attribute defines semantic relationships between your document and outbound URLs using anchor tags.
- Paid links must be qualified with sponsored or nofollow to prevent link spam policy violations.
- User-generated content links in comments or forums should be marked with ugc or nofollow.
- Links marked with nofollow, ugc, or sponsored are generally not followed, but target pages may still be crawled via other sources like sitemaps.
- Multiple rel values can be combined as a space-separated or comma-separated list on a single anchor element.
What is the rel attribute in HTML?
The HTML specification defines links as conceptual connections between two web resources, created using elements like anchor tags, area elements, forms, or link tags. The rel attribute controls what kind of link is created by specifying the relationship between the target resource and the current document. MDN Web Docs explains that rel values express semantic tokens that are meaningful to both machines and humans, distinguishing them from CSS class names that carry no inherent meaning.
For an anchor tag or area element to create a hyperlink, its href attribute must contain a valid URL. If the rel attribute is omitted or contains unrecognized values, standard HTML rules dictate that no specific relationship exists between the documents beyond the presence of the hyperlink itself. Hyperlink annotations can be attached using the rel attribute to modify how user agents and search engine spiders process that link.
When should you use nofollow, ugc, and sponsored attributes?
You should use rel attributes whenever you need to specify your relationship with an outbound page to search engines. Google documents that advertisements or paid links must be qualified with the sponsored attribute value or the nofollow attribute value. Google recommends marking links inside user-generated content, such as forum discussions or comment sections, with the ugc value or the nofollow value.
The nofollow value applies when you prefer that search engines do not associate your site with the linked page or crawl it from your document, or when other specific attributes do not apply. Google advises using nofollow when you do not trust the source, rather than applying it to every external link on your site. MDN Web Docs notes that nofollow indicates the owner of the current document does not endorse the destination resource and tells search engine spiders to ignore the link relationship.
These attributes are used in HTML anchor elements that have an href attribute. Google notes that multiple rel attribute values can be combined on a single link as a space-separated or comma-separated list. While sponsored and ugc apply strictly to anchor elements, nofollow can also be implemented at the document level using a robots meta tag.
How do search engines process link attributes and handle crawling?
Google documents that it can generally only crawl a link if it is an anchor HTML element with an href attribute. Links marked with nofollow, ugc, or sponsored attributes will generally not be followed. However, Google notes that linked pages may still be found through other means, such as sitemaps or links from other sites, and thus may still be crawled.
The visible, clickable text inside a hyperlink is known as anchor text. Google recommends writing anchor text that is descriptive, reasonably concise, and relevant to both the source page and the destination page. Using clear anchor text helps describe the linked destination regardless of which rel attributes are applied to the anchor tag.
Why is qualifying links important for Google link spam policies?
Qualifying commercial and untrusted links helps keep your website compliant with Google search spam policies. Google defines spam as deceptive techniques intended to manipulate search engine systems or rank content prominently, including attempts to manipulate generative AI responses in search results. Link spam specifically refers to creating links to or from a site primarily to manipulate search engine rankings.
Buying and selling links is recognized by Google as a normal web economy practice for advertising and sponsorship. Commercial links do not violate search policies as long as they are properly qualified with either rel="sponsored" or rel="nofollow". Websites that violate link spam rules risk lower search rankings or complete removal from search results.
How do you inspect and audit link attributes on your site?
Auditing outbound links ensures that your website correctly conveys link relationships and complies with search engine guidelines. You can inspect your HTML code to verify that links use valid anchor markup and appropriate rel attributes. Following a step-by-step diagnostic review helps locate unmarked paid links, user submissions, and untrusted destinations.
- 01Inspect HTML source code to confirm that outbound links use valid anchor elements containing href attributes with properly formatted URLs.
- 02Review all user-generated content sections, advertisement spots, and paid sponsorships to identify links that require qualification.
- 03Apply the appropriate rel attribute values by adding sponsored for paid links, ugc for user content, or nofollow for untrusted external destinations, combining values with spaces or commas if multiple attributes apply.
| Link type or issue | Symptom or risk | Recommended action |
|---|---|---|
| Paid placement or advertisement link | Potential link spam policy violation for unqualified paid links | Add rel="sponsored" or rel="nofollow" to the anchor tag. |
| User-submitted comment or forum post link | Risk of association with unverified or spammy user content | Add rel="ugc" or rel="nofollow" to the anchor tag. |
| Untrusted external page link | Passing implicit endorsement to an untrusted source | Add rel="nofollow" to the anchor tag. |
Common questions
Can you combine multiple rel attribute values on a single link?
Yes, Google documents that you can specify multiple rel values on a single anchor tag by listing them as a space-separated or comma-separated list, such as combining ugc and nofollow.
Does adding rel="nofollow" prevent a page from being crawled completely?
Not necessarily. While search engines generally will not follow links marked with nofollow, the destination page may still be crawled if search engines discover it through other means, such as sitemaps or links from other websites.
Is buying links allowed under Google search policies?
Buying and selling links for advertising or sponsorship is recognized as a normal part of the web economy. It does not violate Google search policies as long as the links are qualified with rel="sponsored" or rel="nofollow".
What happens if a website violates Google link spam policies?
Websites that violate Google search spam policies, including failing to qualify paid links, may suffer ranking penalties, causing pages to rank lower or not appear in search results at all.
Primary sources and further reading
This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.