/marketing-seo:canonical-tagfrom marketing-seo
Audits and fixes duplicate-page canonicalization across protocol, host, slash, default-document, extension, case, and tracking-parameter URL variants. Use for canonical URLs, duplicate content, preferred URLs, URL consolidation, or conflicting canonical signals.
Ships in marketing-seo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Determine the preferred URL for each page identity, consolidate duplicate variants, and verify that redirects, canonical annotations, internal links, sitemaps, and localization signals agree.
Treat these as one duplicate-page canonicalization problem when they expose the same or substantially similar primary content:
/docs//guide;/docs/ and /docs/index.html;/guide.html and /guide;/Guide and /guide;Do not assume that similar-looking URLs are duplicates. Case, parameters, extensions, and slash behavior can identify different resources. Compare response behavior, primary content, and project intent before consolidating.
Read root contextus.md when present and only the modules relevant to the task. Otherwise use project configuration, routing code, deployment rules, sitemaps, and user-provided facts. Establish:
Ask only for missing information that would change the preferred URL or make a redirect unsafe.
| Situation | Primary action |
|---|---|
| Duplicate URL should no longer remain accessible | Permanent server-side redirect to the final preferred URL |
| Duplicate or near-duplicate must remain accessible | rel="canonical" to the preferred URL |
| Canonical HTML page | Self-referencing canonical |
| Non-HTML duplicate such as a PDF | Canonical HTTP Link header when supported |
| Tracking parameter that must reach analytics | Keep the landing request if needed; canonical to the content URL without tracking parameters |
| Parameter changes primary content or search intent | Evaluate as a separate page; do not strip or canonicalize mechanically |
| Pagination | Give each page a crawlable URL and evaluate it as distinct content; do not canonicalize every page to page 1 |
| Language or regional variant | Canonical within the appropriate language identity and coordinate with hreflang |
Use redirects to retire duplicate access paths. Use canonical annotations when access must remain. Do not use robots.txt, the removal tool, or noindex as substitutes for canonicalization.
Generate applicable test cases from the real site rather than testing one example only.
| Dimension | Variants to test | Expected invariant |
|---|---|---|
| Scheme | http, https | Non-preferred scheme reaches preferred HTTPS URL |
| Host | www, apex, known aliases | Non-preferred hosts reach one preferred host |
| Scheme + host | all supported combinations | Each duplicate reaches the same final URL without a redirect chain |
| Trailing slash | /page, /page/ | One convention for the same page identity |
| Repeated slash | /a//b, /a/b | Duplicate path normalizes without corrupting :// |
| Default document | /, /index.html; /docs/, /docs/index.html | Default-document aliases converge when content is equivalent |
| Extension | /guide.html, /guide | Historical alias maps to the corresponding page, not the homepage |
| Case | /Guide, /guide | Equivalent paths converge; genuinely case-distinct resources remain distinct |
| Tracking | base URL plus utm_*, gclid, or project tracking keys | Attribution works as required; content identity remains the clean URL |
| Combinations | case + extension + tracking + host/scheme variants | Normalize directly to one destination where safe |
Do not invent routes or send mutation requests during an audit. Use read-only requests unless the user asks to implement fixes.
For every preferred URL, verify:
hreflang URLs and return links when applicable;Canonical targets must be absolute, fetchable, indexable, and appropriate for the same content identity. Avoid canonical chains and conflicting targets across methods.
Record evidence for representative URLs and high-risk templates:
hreflang consistency;Confirm that retired variants reach their corresponding preferred page in one hop where infrastructure permits. A final 200 alone is insufficient: the final URL and canonical must also be correct. For Google-specific diagnosis, compare the user-declared and Google-selected canonicals in URL Inspection when access is available.
Implement in the layer that owns the behavior: CDN or reverse proxy for host/scheme normalization, server/router for paths, and page metadata for canonical annotations. Preserve query parameters needed for attribution or product behavior; remove only parameters confirmed not to affect the destination.
When changing live URLs, provide a mapping and rollback-aware implementation plan. Do not apply redirects to production, alter DNS, or change indexing controls without the user's authorization.
Return:
References: Google canonicalization, canonical methods, redirects, and URL structure.
hreflang for localized pages.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
canonical-url, seo, duplicate-content, url-consolidation, redirects
npx claudepluginhub hackernoon/cuttlefish-agent-skills --plugin marketing-seo307 skills in this plugin
/404-page-generatorDeprecated compatibility entry for 404 Page construction. This page is now maintained in Pagina; install and use page-builder to build a new 404 Page./ab-testingWhen the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro./ab-test-setupWhen the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.Other plugins' skills for the same job