Canonical
Each page declares a preferred URL so search engines show the right link.
On this page
Impact
About
Canonicalization ensures that search engines index the correct version of a page when there are duplicate or similar pages. By specifying a canonical URL with the rel="canonical" tag, you direct search engines to the primary page, helping improve SEO. This prevents search engines from splitting the ranking between multiple pages with similar content. Proper canonicalization avoids indexing issues and boosts a site's performance in search results.
Risks
Search rankings split across duplicate pages.
Why it's important
Prevents duplicate content issues by telling search engines which version of a page is the main one.
User stories
As a user or search engine bot, I want to be directed to the preferred version of a webpage (canonical URL) to avoid duplicate content and ensure that I am viewing the correct page with the most relevant content.
Code
Add inside <head>:
<link rel="canonical" href="https://example.gov/page/">
Error
ScanGov messaging when a site fails a standard:
Duplicate page URLs detected.
Examples
When multiple URLs serve the same content:
<!-- All these URLs resolve to the same page -->
https://example.gov/page
https://example.gov/page/
https://www.example.gov/page/
<!-- Canonical tells search engines which is the primary URL -->
<link rel="canonical" href="https://example.gov/page/">
Guidance
Links
Indicators
On this page