Lighthouse — Google's performance and SEO audit tool
What is Lighthouse?
Lighthouse is Google's open-source web page audit tool (released 2017). It automatically tests performance, SEO, accessibility, best practices, and PWA. Available in Chrome DevTools, CLI, as a Node module, and integrated in PageSpeed Insights (PSI).
Lighthouse generates a score 0-100 for each category + detailed recommendations on what to improve.
5 audit categories
1. Performance
- Core Web Vitals — LCP, INP, CLS
- First Contentful Paint (FCP)
- Speed Index
- Total Blocking Time (TBT)
- Time to Interactive (TTI) — deprecated in 2024
2. Accessibility
- ARIA roles correctness
- Color contrast (WCAG 2.1)
- Form labels
- Heading hierarchy
- Image alt text
- Keyboard navigation
3. Best Practices
- HTTPS usage
- Console errors
- JS library vulnerabilities
- Image aspect ratio
- Browser compatibility
4. SEO
- Meta tags (title, description)
- Viewport meta
- Crawlable links
- robots.txt validity
- Mobile-friendly
5. PWA (Progressive Web App)
- Service worker
- Manifest.json
- Installable
Scoring
| Score | Status |
|---|---|
| 90-100 | Good (green) |
| 50-89 | Needs Improvement (orange) |
| 0-49 | Poor (red) |
Performance score is a weighted composition: LCP 25%, TBT 30%, CLS 25%, FCP 10%, Speed Index 10%.
Lighthouse vs PageSpeed Insights vs CrUX
- Lighthouse — lab data (controlled environment, single test run)
- PageSpeed Insights (PSI) — web version of Lighthouse + CrUX field data (real users)
- Chrome User Experience Report (CrUX) — field data from real Chrome users (last 28 days)
Lab vs Field: Lab is simulation in specific throttle setting (Slow 4G, Moto G4 CPU). Field is what users actually experience.
For SEO, Google uses field data (CrUX) as a ranking signal. Lab data (Lighthouse) is for debugging.
How to run Lighthouse
Chrome DevTools
- F12 → Lighthouse tab → Analyze page load
- Options: Mobile/Desktop, categories, throttling
CLI
npm install -g lighthouse
lighthouse https://example.com --view --preset=desktop
Node module
const lighthouse = require('lighthouse');
const result = await lighthouse(url, { onlyCategories: ['performance'] });
CI/CD
- Lighthouse CI (
@lhci/cli) — automatic audits in PR - GitHub Action —
treosh/lighthouse-ci-action
Bulk audit
- PageSpeed Insights API — programmatic CrUX + Lighthouse data
- MarketingOS —
cli cwv check <company> <url1> <url2>uses PSI API
Performance optimization checklist (Lighthouse)
- Image optimization — WebP/AVIF, responsive srcset, lazy loading
- Minify CSS/JS — at build (Next.js, Vite, Webpack do auto)
- Code splitting — dynamic imports for below-fold
- Font optimization —
display: swap, preconnect, subset - Critical CSS — inline above-the-fold styles
- Defer non-critical JS —
<script defer>/<script async> - CDN — global edge (Cloudflare Pages)
- HTTP/2 + brotli — server config
- Cache headers — long max-age for static, immutable
- Reduce 3rd-party — minimize trackers, lazy-load analytics
Common mistakes
- Score chasing — 100/100 vs 95/100 doesn't change ranking, but +10 hours of work
- Lab vs field disconnect — Lighthouse shows 95, but CrUX shows 70 → your optimization doesn't reflect real users
- Single page audit — typically you test home, but each page has different score
- No monitoring — one-time audit vs continuous monitoring (PSI weekly)
Related terms
- Core Web Vitals — what Lighthouse measures
- SEO — Lighthouse SEO category
- Technical SEO — context
- Cloudflare Pages — tool for score improvement
- Astro — framework wins Lighthouse
- Conversion rate — performance → CR correlation