Semantic HTML is important for SEO...
Latest News
Article content here...
# SEO Best Practices - Complete Reference **Version:** 1.2.0 **Organization:** Agent Skills Contributors **Date:** March 2026 **License:** MIT ## Abstract Comprehensive SEO patterns for web applications built with React and Laravel. Contains 31 rules across 8 categories covering Core Web Vitals, technical SEO, on-page optimization, structured data, performance, social sharing, React/SPA SEO, and mobile-first indexing. Supports SEO audit mode with PASS/FAIL checklist output. Each rule includes incorrect and correct code examples with practical HTML, React (Inertia.js), and Laravel implementations. ## How to Audit When asked to "audit SEO" or "check SEO", run through each rule in this document as a checklist. For each item output **PASS**, **FAIL** (with `file:line` and fix), or **N/A**. End with a summary of pass/fail counts and top 3 priority fixes. ## References - [Google Search Central](https://developers.google.com/search) - [web.dev Core Web Vitals](https://web.dev/articles/vitals) - [Schema.org](https://schema.org/) - [Open Graph Protocol](https://ogp.me/) - [Google Rich Results Test](https://search.google.com/test/rich-results) - [Google PageSpeed Insights](https://pagespeed.web.dev/) - [Google Search Console](https://search.google.com/search-console) - [Mobile-First Indexing](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing) ## Step 1: Detect Project Type **Always check the project stack before giving advice.** Different stacks need different SEO approaches. Check `package.json` and project structure: | Signal | Project Type | |--------|-------------| | `@inertiajs/react` in dependencies | Laravel + Inertia + React | | `resources/views/**/*.blade.php` only (no React) | Laravel Blade (server-rendered) | **If Laravel Blade:** Apply `tech-`, `onpage-`, `schema-`, `perf-`, `social-`, `mobile-` rules. Meta tags go in Blade layouts. Sitemaps via `spatie/laravel-sitemap`. Skip `spa-` rules — pages are already server-rendered. **If Laravel + Inertia + React:** Apply all rules. Meta tags via `@inertiaHead` in Blade layout + `
` component from `@inertiajs/react` in React pages. For SSR, create `resources/js/ssr.jsx` using `createServer` from `@inertiajs/react/server`, add `ssr: 'resources/js/ssr.jsx'` to Vite config, build with `vite build && vite build --ssr`, and run `php artisan inertia:start-ssr`. Use `head-key` attribute on meta tags to prevent duplicates between layout and page. Focus on `schema-`, `social-`, and `perf-` rules. --- # Sections This file defines all sections, their ordering, impact levels, and descriptions. The section ID (in parentheses) is the filename prefix used to group rules. --- ## 1. Core Web Vitals (cwv) **Impact:** CRITICAL **Description:** Google uses Core Web Vitals (LCP, INP, CLS) as ranking signals. Pages that fail these thresholds rank lower and provide poor user experience. Optimizing CWV is the highest-impact technical SEO work. ## 2. Technical SEO (tech) **Impact:** CRITICAL **Description:** Foundational SEO elements that search engines need to discover, crawl, and index pages correctly. Without proper meta tags, canonical URLs, sitemaps, and robots.txt, content cannot rank regardless of quality. ## 3. On-Page SEO (onpage) **Impact:** HIGH **Description:** Content structure and HTML semantics that help search engines understand page topics and relevance. Proper headings, semantic markup, internal linking, and image optimization directly affect rankings. ## 4. Structured Data (schema) **Impact:** HIGH **Description:** JSON-LD markup using Schema.org vocabulary that enables rich results in search (star ratings, FAQ accordions, breadcrumb trails, product prices). Structured data does not directly boost rankings but significantly improves click-through rates. ## 5. Performance SEO (perf) **Impact:** HIGH **Description:** Page speed and loading optimization that affects both Core Web Vitals scores and user experience. Modern image formats, lazy loading, font strategies, and resource hints reduce load times and improve search ranking. ## 6. Social Sharing (social) **Impact:** HIGH **Description:** Open Graph and Twitter Card meta tags that control how pages appear when shared on social media. Proper social meta tags increase click-through rates from social platforms and drive organic traffic. ## 7. React/SPA SEO (spa) **Impact:** HIGH **Description:** SEO patterns specific to single-page applications built with React. SPAs require special attention to rendering strategy, meta tag management, and routing to be crawlable by search engines. ## 8. Mobile-First (mobile) **Impact:** MEDIUM **Description:** Google uses mobile-first indexing, meaning it primarily crawls and indexes the mobile version of pages. Mobile viewport configuration, content parity, and UX requirements directly affect how pages are indexed and ranked. --- ## Largest Contentful Paint Optimization **Impact: CRITICAL (Must be under 2.5s (Google ranking signal))** LCP measures how long it takes for the largest visible element (usually a hero image or heading) to render. Google uses LCP as a direct ranking signal, and pages exceeding 2.5s risk lower search positions and higher bounce rates. ## Incorrect ```html
Article content here...
Article content here...
{product.description}
{product.description}
High-performance running shoes for every terrain.
We have been selling shoes since 2010.
Grip-focused shoes designed for off-road surfaces.
Lightweight cushioned shoes for pavement.
See what runners are saying about our best sellers.
Semantic HTML is important for SEO...
Semantic HTML is important for SEO...
Search engines use element types to weight content relevance.
The most impactful elements are main, article, nav, and section.