When the user wants to optimize URL structure, fix URL issues, or plan URL hierarchy. Also use when the user mentions "URL structure," "URL optimization," "s...
Guides URL structure optimization for SEO: readability, hierarchy, and best practices.
When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.
Check for project context first: If .claude/project-context.md or .cursor/project-context.md exists, read it for site structure.
Identify:
PrincipleGuidelineReadableUse words, not IDs; /blog/seo-guide not /p/12345ShortShorter is generally better; avoid unnecessary depthKeywordInclude target keyword when naturalLowercaseUse lowercase; avoid mixed caseHyphensUse hyphens to separate words: seo-guideAvoidSpecial chars, query params for core content, session IDs
PatternExampleUseFlat/page-nameSimple sitesCategory/blog/post-name, /tools/tool-nameContent sitesNested/category/subcategory/pageDeep hierarchies (keep shallow)
PatternExamplePath prefix/zh/page, /en/pageSubdomainzh.example.com, en.example.comccTLDexample.cn, example.com
TypeExampleUseStatic/blog/seo-guideDirect file; best SEO; content stableDynamic/product?id=123Program-generated; avoid for indexable contentPseudo-static/blog/seo-guide (rewritten from .php)Combines both; common in CMSRulePrefer static or pseudo-static; if dynamic, keep params ≤2; use canonical-tag and robots-txt (Clean-param)
.html, .php, .aspx — keeps URLs technology-agnostic, shorter, easier to refactor/seo-guide not /seo-guide.htmlScenarioApproachUTM / trackingCanonical to base URL; params in query string onlySearch resultsCanonical to search page; avoid indexing result URLsFilters / sortCanonical to base; or robots-txt Clean-paramSession IDsUse cookies; never in indexable URLs
ScenarioFocusNew sitePlan hierarchy upfront; avoid later restructuringMigration301 mapping; canonical; see canonical-tag****Large siteDynamic URLs, params, multi-language — canonical + robotsSEO auditCheck structure, params, canonical consistency
IssueFixLong URLsShorten; remove redundant wordsDynamic paramsUse canonical; clean params in robots (Yandex Clean-param)Mixed caseRedirect to lowercaseChanged URLs301 redirect old to new
website-structure: Plan structure and URL paths; apply url-structure rules after structure is defined
canonical-tag: HTTPS, www, trailing slash — handles duplicate URL variants
url-slug-generator: Slug creation for content pages; length, keywords, format
category-page-generator: E-commerce category URL hierarchy, faceted URLs
products-page-generator: Product URL hierarchy
services-page-generator: Service URL hierarchy
robots-txt: Clean-param for query params
internal-links: URL structure affects link patterns