--- name: seo description: Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization". license: MIT metadata: author: web-quality-skills version: "1.0" --- # SEO optimization Search engine optimization based on Lighthouse SEO audits and Google Search guidelines. Focus on technical SEO, on-page optimization, and structured data. ## SEO fundamentals Search ranking factors (approximate influence): | Factor | Influence | This Skill | |--------|-----------|------------| | Content quality & relevance | ~40% | Partial (structure) | | Backlinks & authority | ~25% | ✗ | | Technical SEO | ~15% | ✓ | | Page experience (Core Web Vitals) | ~10% | See [Core Web Vitals](../core-web-vitals/SKILL.md) | | On-page SEO | ~10% | ✓ | --- ## Technical SEO ### Crawlability **robots.txt:** ```text # /robots.txt User-agent: * Allow: / # Block admin/private areas Disallow: /admin/ Disallow: /api/ Disallow: /private/ # Don't block resources needed for rendering # ❌ Disallow: /static/ Sitemap: https://example.com/sitemap.xml ``` **Meta robots:** ```html ``` **Canonical URLs:** ```html ``` ### XML sitemap ```xml https://example.com/ 2024-01-15 daily 1.0 https://example.com/products 2024-01-14 weekly 0.8 ``` **Sitemap best practices:** - Maximum 50,000 URLs or 50MB per sitemap - Use sitemap index for larger sites - Include only canonical, indexable URLs - Update `lastmod` when content changes - Submit to Google Search Console ### URL structure ``` ✅ Good URLs: https://example.com/products/blue-widget https://example.com/blog/how-to-use-widgets ❌ Poor URLs: https://example.com/p?id=12345 https://example.com/products/item/category/subcategory/blue-widget-2024-sale-discount ``` **URL guidelines:** - Use hyphens, not underscores - Lowercase only - Keep short (< 75 characters) - Include target keywords naturally - Avoid parameters when possible - Use HTTPS always ### HTTPS & security ```html ``` **Security headers for SEO trust signals:** ``` Strict-Transport-Security: max-age=31536000; includeSubDomains X-Content-Type-Options: nosniff X-Frame-Options: DENY ``` --- ## On-page SEO ### Title tags ```html Page Home Blue Widgets for Sale | Premium Quality | Example Store ``` **Title tag guidelines:** - 50-60 characters (Google truncates ~60) - Primary keyword near the beginning - Unique for every page - Brand name at end (unless homepage) - Action-oriented when appropriate ### Meta descriptions ```html ``` **Meta description guidelines:** - 150-160 characters - Include primary keyword naturally - Compelling call-to-action - Unique for every page - Matches page content ### Heading structure ```html

Welcome to Our Store

Products

Contact Us

Blue Widgets - Premium Quality

Product Features

Durability

Design

Customer Reviews

Pricing

``` **Heading guidelines:** - Single `

` per page (the main topic) - Logical hierarchy (don't skip levels) - Include keywords naturally - Descriptive, not generic ### Image SEO ```html Blue widget with chrome finish, side view showing control panel ``` **Image guidelines:** - Descriptive filenames with keywords - Alt text describes the image content - Compressed and properly sized - WebP/AVIF with fallbacks - Lazy load below-fold images ### Internal linking ```html Click here Read more Browse our blue widget collection Learn how to maintain your widgets ``` **Linking guidelines:** - Descriptive anchor text with keywords - Link to relevant internal pages - Reasonable number of links per page - Fix broken links promptly - Use breadcrumbs for hierarchy --- ## Structured data (JSON-LD) ### Organization ```html ``` ### Article ```html ``` ### Product ```html ``` ### FAQ ```html ``` ### Breadcrumbs ```html ``` ### Validation Test structured data at: - [Google Rich Results Test](https://search.google.com/test/rich-results) - [Schema.org Validator](https://validator.schema.org/) --- ## AI search visibility (emerging) A class of AI search engines (ChatGPT search, Perplexity, Gemini Overviews) cite web pages from their training and retrieval pipelines, not from the classic ranked results. As of 2026 this is an unstable area — there are no confirmed ranking signals — but a few things are low-cost and won't hurt: - **Don't block AI crawlers wholesale.** `OAI-SearchBot`, `PerplexityBot`, `GoogleOther`, `Google-Extended`, `ClaudeBot`, etc. each have separate `robots.txt` user-agents. Decide per-bot rather than blanket-blocking — a `Disallow` removes you from that bot's citations. - **Lean on schema.org `Article`/`Product`/`FAQPage`.** AI summarizers parse structured data more reliably than they parse prose layouts. The structured-data examples above are the same ones that help here. - **Make first-paragraph answers self-contained.** Both featured snippets and AI summaries pull short, coherent passages. A definition or direct answer in the first 1-2 sentences is more extractable than the same content buried under marketing prose. ### `llms.txt` — emerging, unproven [`llms.txt`](https://llmstxt.org/) is a proposed convention (a Markdown index of your site's important pages, served at `/llms.txt`) for LLMs to consume. As of mid-2026 adoption is ~0.015% of sites and **no major AI vendor has confirmed they read it**. Treat it as a 5-minute speculative add for content sites — not a meaningful ranking or citation factor — and don't reorganize content around it. --- ## Mobile SEO ### Responsive design ```html ``` ### Tap targets ```css /* ❌ Too small for mobile */ .small-link { padding: 4px; font-size: 12px; } /* ✅ Adequate tap target */ .mobile-friendly-link { padding: 12px; font-size: 16px; min-height: 48px; min-width: 48px; } ``` ### Font sizes ```css /* ❌ Too small on mobile */ body { font-size: 10px; } /* ✅ Readable without zooming */ body { font-size: 16px; line-height: 1.5; } ``` --- ## International SEO ### Hreflang tags ```html ``` ### Language declaration ```html ``` --- ## SEO audit checklist ### Critical - [ ] HTTPS enabled - [ ] robots.txt allows crawling - [ ] No `noindex` on important pages - [ ] Title tags present and unique - [ ] Single `

` per page ### High priority - [ ] Meta descriptions present - [ ] Sitemap submitted - [ ] Canonical URLs set - [ ] Mobile-responsive - [ ] Core Web Vitals passing ### Medium priority - [ ] Structured data implemented - [ ] Internal linking strategy - [ ] Image alt text - [ ] Descriptive URLs - [ ] Breadcrumb navigation ### Ongoing - [ ] Fix crawl errors in Search Console - [ ] Update sitemap when content changes - [ ] Monitor ranking changes - [ ] Check for broken links - [ ] Review Search Console insights --- ## Tools | Tool | Use | |------|-----| | Google Search Console | Monitor indexing, fix issues | | Google PageSpeed Insights | Performance + Core Web Vitals | | Rich Results Test | Validate structured data | | Lighthouse | Full SEO audit | | Screaming Frog | Crawl analysis | ## References - [Google Search Central](https://developers.google.com/search) - [Schema.org](https://schema.org/) - [Core Web Vitals](../core-web-vitals/SKILL.md) - [Web Quality Audit](../web-quality-audit/SKILL.md)