Link Relations & Canonical Tags
10 min read
rel=canonicalrel=noopenerrel=noreferrerrel=alternaterel=prev/next
Link Relations: Metadata for Connections
The rel attribute defines the relationship between the current document and the linked resource. Critical for SEO, security, and performance.
Security Link Relations
| Value | Purpose |
|---|---|
| noopener | Prevents new window from accessing window.opener (security) |
| noreferrer | Prevents sending Referer header + includes noopener |
| nofollow | Tells search engines not to follow this link |
SEO Link Relations
| Value | Purpose |
|---|---|
| canonical | The primary URL for duplicate content |
| alternate | Alternative versions (language, mobile, RSS) |
| prev/next | Pagination sequence |
Why noopener Matters
Without rel="noopener", a link opened with target="_blank" gives the new page access to window.opener — the new page can navigate your page to a phishing URL.
Modern browsers add noopener by default for target=_blank, but explicit is better.