Core Web Vitals Optimization Guide: How to Fix the Metrics Google Actually Cares About
Your rankings dropped. Your traffic is flat. You've checked your content, your backlinks, your keyword targeting — everything looks fine. But Google is quietly measuring something else: how your page feels to load.
That's what Core Web Vitals measure. And this core web vitals optimization guide will show you exactly how to fix them.
What Are Core Web Vitals, Really?
Core Web Vitals are three specific metrics Google uses to score user experience:
- LCP (Largest Contentful Paint) — how fast the main content loads
- INP (Interaction to Next Paint) — how quickly the page responds to clicks and taps
- CLS (Cumulative Layout Shift) — how much the page jumps around while loading
Google replaced FID with INP in March 2024, so if you're still optimizing for First Input Delay, you're working with outdated information.
Here are the thresholds that matter:
| Metric | Good | Needs Work | Poor |
|---|---|---|---|
| LCP | ≤ 2.5s | 2.5–4.0s | > 4.0s |
| INP | ≤ 200ms | 200–500ms | > 500ms |
| CLS | ≤ 0.1 | 0.1–0.25 | > 0.25 |
A page passes only when 75% of real user visits hit the "good" threshold for all three.
Start Here: Measure Before You Touch Anything
Don't guess. Pull real data first.
- PageSpeed Insights — lab + field data for a single URL
- Search Console → Core Web Vitals report — shows which URL groups fail
- Chrome DevTools Performance panel — diagnose specific bottlenecks
- web-vitals JavaScript library — send real user metrics to your analytics
Pro tip: Always trust field data (real users) over lab data. Your MacBook on fiber is not your average visitor on a mid-range Android phone.
Fixing LCP: Make the Main Content Load Fast
LCP is usually one of four things: a hero image, a video poster, a background image, or a large text block.
Compress and preload your hero image
<link rel="preload" as="image" href="/hero.webp" fetchpriority="high">
<img src="/hero.webp" alt="Hero" width="1200" height="600">
Serve WebP or AVIF instead of JPEG. You'll typically cut file size by 30–60% with no visible quality loss.
Cut render-blocking resources
CSS and synchronous JavaScript in your <head> delay everything. Inline critical CSS, defer the rest:
<link rel="preload" href="styles.css" as="style" onload="this.rel='stylesheet'">
<script src="app.js" defer></script>
Upgrade your hosting and use a CDN
If your Time to First Byte (TTFB) is above 800ms, nothing else you do will save your LCP. Move to faster hosting and put a CDN like Cloudflare or Fastly in front of it.
Fixing INP: Make Interactions Feel Instant
INP measures the delay between a user's tap and the browser's visual response — across every interaction on the page, not just the first one.
Break up long tasks
Any JavaScript task over 50ms blocks the main thread. Split heavy work:
// Bad: blocks the main thread
data.forEach(item => processHeavy(item));
// Better: yield between chunks
for (const item of data) {
processHeavy(item);
await new Promise(r => setTimeout(r, 0));
}
Debounce expensive event handlers
Search boxes, scroll listeners, and resize handlers fire constantly. Debounce them so they run after the user pauses:
let timer;
input.addEventListener('input', () => {
clearTimeout(timer);
timer = setTimeout(() => runSearch(), 300);
});
Trim third-party scripts
Analytics, chat widgets, heatmaps, A/B testing tools — each one adds main-thread work. Audit them quarterly. If a tag hasn't driven measurable value in 90 days, delete it.
Fixing CLS: Stop the Jumps
Layout shift happens when elements load without reserved space or move after rendering.
Always set width and height on images and videos
<img src="photo.jpg" width="800" height="450" alt="...">
The browser reserves the correct aspect ratio before the image arrives. No jump.
Reserve space for ads and embeds
.ad-slot { min-height: 250px; }
Never inject content above existing content unless it's in response to a user action.
Fix font swapping
Use font-display: optional or preload your web fonts to avoid a late swap that reflows text:
@font-face {
font-family: 'Inter';
src: url('/inter.woff2') format('woff2');
font-display: swap;
}
A Practical Optimization Workflow
Here's the order that gets results fastest:
- Run PageSpeed Insights on your top 10 traffic pages
- Fix TTFB first — hosting, caching, CDN
- Optimize the LCP element — compress, preload, prioritize
- Audit third-party scripts — remove or defer
- Set explicit dimensions on all media
- Re-measure after 28 days — field data needs time to update
Real-World Example
A SaaS client came to me with an LCP of 4.8s and a CLS of 0.31. Three changes fixed it:
- Converted the hero PNG (1.4MB) to AVIF (89KB) and preloaded it
- Removed two unused marketing scripts from the header
- Added
widthandheightto blog thumbnails
Result after 30 days: LCP dropped to 1.9s, CLS to 0.04. Organic sessions climbed 22% the following quarter.
Common Mistakes to Avoid
- Optimizing only the homepage and ignoring templates
- Trusting lab scores over field data
- Lazy-loading the LCP image (a classic own-goal)
- Chasing a perfect 100 score instead of passing thresholds
- Forgetting mobile — most of your traffic is there
Core Web Vitals aren't a one-time project. Treat them like a health check you run every quarter, and your rankings — plus your users — will thank you for it.