MCPInstall

canonical-tag

Audit and fix 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. For URL naming and hierarchy design, use url-structure.

Installs
1.1K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/kostja94/marketing-skills --skill canonical-tag
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads canonical-tag automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

SEO Technical: Canonicalization

Determine the preferred URL for each page identity, consolidate duplicate variants, and verify that redirects, canonical annotations, internal links, sitemaps, and localization signals agree.

Scope

Treat these as one duplicate-page canonicalization problem when they expose the same or substantially similar primary content:

  • HTTP and HTTPS;
  • www and non-www hosts, including combined protocol/host variants;
  • trailing-slash and non-trailing-slash paths;
  • repeated path slashes such as /docs//guide;
  • directory defaults such as /docs/ and /docs/index.html;
  • historical extensions such as /guide.html and /guide;
  • case variants such as /Guide and /guide;
  • UTM and other tracking parameters that do not change primary content.

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.

Inputs and Context

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:

  1. preferred scheme and host;
  2. preferred path conventions;
  3. which parameters change content versus only attribution or presentation;
  4. framework, origin server, CDN, and redirect ownership;
  5. existing indexed URLs, backlinks, migrations, and localization rules when relevant.

Ask only for missing information that would change the preferred URL or make a redirect unsafe.

Decision Rules

SituationPrimary action
Duplicate URL should no longer remain accessiblePermanent server-side redirect to the final preferred URL
Duplicate or near-duplicate must remain accessiblerel="canonical" to the preferred URL
Canonical HTML pageSelf-referencing canonical
Non-HTML duplicate such as a PDFCanonical HTTP Link header when supported
Tracking parameter that must reach analyticsKeep the landing request if needed; canonical to the content URL without tracking parameters
Parameter changes primary content or search intentEvaluate as a separate page; do not strip or canonicalize mechanically
PaginationGive each page a crawlable URL and evaluate it as distinct content; do not canonicalize every page to page 1
Language or regional variantCanonical 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.

Variant Audit Matrix

Generate applicable test cases from the real site rather than testing one example only.

DimensionVariants to testExpected invariant
Schemehttp, httpsNon-preferred scheme reaches preferred HTTPS URL
Hostwww, apex, known aliasesNon-preferred hosts reach one preferred host
Scheme + hostall supported combinationsEach 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/bDuplicate path normalizes without corrupting ://
Default document/, /index.html; /docs/, /docs/index.htmlDefault-document aliases converge when content is equivalent
Extension/guide.html, /guideHistorical alias maps to the corresponding page, not the homepage
Case/Guide, /guideEquivalent paths converge; genuinely case-distinct resources remain distinct
Trackingbase URL plus utm_*, gclid, or project tracking keysAttribution works as required; content identity remains the clean URL
Combinationscase + extension + tracking + host/scheme variantsNormalize 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.

Signal Consistency

For every preferred URL, verify:

  • redirect targets, HTML canonical or canonical HTTP header;
  • internal navigation and content links;
  • XML sitemap entries;
  • hreflang URLs and return links when applicable;
  • structured-data URLs and feeds when they identify the page;
  • framework-generated metadata and client-side code do not overwrite the source canonical.

Canonical targets must be absolute, fetchable, indexable, and appropriate for the same content identity. Avoid canonical chains and conflicting targets across methods.

Verification

Record evidence for representative URLs and high-risk templates:

  1. requested URL;
  2. HTTP status and each redirect hop;
  3. final URL;
  4. source canonical target;
  5. indexability and content-equivalence result;
  6. sitemap, internal-link, and hreflang consistency;
  7. pass, fail, or needs-decision status.

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.

Implementation Boundaries

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.

Output

Return:

  • the preferred scheme, host, and path conventions;
  • duplicate clusters and the evidence that they represent the same page;
  • a variant matrix with current and expected behavior;
  • the selected method for each cluster: redirect, canonical, separate page, or needs decision;
  • implementation location and exact proposed change when requested;
  • verification results and unresolved risks.

References: Google canonicalization, canonical methods, redirects, and URL structure.

Related Skills

  • url-structure: Design readable hierarchy and format for new canonical URLs.
  • localization-strategy: Coordinate canonical and hreflang for localized pages.
  • xml-sitemap: Publish only canonical indexable URLs.
  • indexing: Diagnose indexability and selected-canonical issues.
  • site-crawlability: Inspect crawl waste, redirect chains, and response behavior.
  • google-search-console: Inspect Google-selected canonicals when property access exists.

FAQ

What does the canonical-tag skill do?

Audit and fix 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. For URL naming and hierarchy design, use url-structure.

How do I install canonical-tag?

Run npx skills add https://github.com/kostja94/marketing-skills --skill canonical-tag in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/canonical-tag/ (personal) or .claude/skills/canonical-tag/ (project).

Which AI agents can use canonical-tag?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is canonical-tag safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains canonical-tag?

It is published by kostja94 in kostja94/marketing-skills. It has 1,146 recorded installs.

More from kostja94/marketing-skills

View all →

copywriting

kostja94/marketing-skills

When the user wants to write or optimize short-form marketing copy—headlines, CTAs, ad copy, landing page copy, email copy. Also use when the user mentions "copywriting," "headline," "CTA copy," "ad copy," "landing page copy," "sales copy," "conversion copy," "PAS," "AIDA," "BAB," "copy formula," or "differentiation." For long-form article bodies (blog posts, guides), use article-content.

Marketing & SEO3.9K installs

linkedin-posts

kostja94/marketing-skills

When the user wants to create LinkedIn post copy or optimize for LinkedIn. Also use when the user mentions "LinkedIn post," "LinkedIn article," "professional post," "post to LinkedIn," "LinkedIn content," "LinkedIn copy," "B2B LinkedIn," "LinkedIn engagement," "LinkedIn feed," "share box," "document post," "poll," "Newsletter," "reshare," or "LinkedIn marketing." For LinkedIn ads, use linkedin-ads.

Marketing & SEO3.6K installs

youtube-seo

kostja94/marketing-skills

When the user wants to optimize YouTube videos for search, create video descriptions, or improve channel visibility. Also use when the user mentions "YouTube SEO," "YouTube description," "YouTube tags," "YouTube thumbnail," "YouTube title," "YouTube channel," or "video SEO." For YouTube ads, use youtube-ads.

Marketing & SEO3.4K installs

video-marketing

kostja94/marketing-skills

When the user wants to plan video marketing, create video scripts, or optimize for short-form or long-form video. Also use when the user mentions "video marketing," "video script," "short-form video," "long-form video," "TikTok script," "Reels script," "YouTube script," "video hook," or "video content strategy." For on-site video SEO, use video-optimization.

Marketing & SEO3.1K installs

tiktok-captions

kostja94/marketing-skills

When the user wants to create TikTok video captions, scripts, or optimize for TikTok. Also use when the user mentions "TikTok post," "TikTok caption," "TikTok video," "post to TikTok," "TikTok script," "TikTok content," "TikTok copy," "TikTok hashtags," or "TikTok marketing." For TikTok ads, use tiktok-ads.

Marketing & SEO2.8K installs

local-seo

kostja94/marketing-skills

When the user wants to optimize for local search, set up Google Business Profile, or build local citations. Also use when the user mentions "local SEO," "Google Business Profile," "Google Maps," "NAP," "citations," "local search," "local business," or "service area." For location pages, use programmatic-seo.

Marketing & SEO2.5K installs

Popular security skills

View category →

azure-compliance

microsoft/azure-skills

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

OfficialSecurity567K installs

minimal-run-and-audit

lllllllama/rigorpilot-skills

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

Security477.4K installs

seo-audit

coreyhaines31/marketingskills

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.

Security238.7K installs

firebase-security-rules-auditor

firebase/agent-skills

Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.

OfficialSecurity139.1K installs

audit

pbakaus/impeccable

Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.

Security81.9K installs

competitors

coreyhaines31/marketingskills

When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.

Security79.3K installs