Technical SEO

Optimize Page Speed — Step-by-Step Guide

Compress images to WebP/AVIF, enable browser caching, use CDN, minify CSS/JS, implement lazy loading, inline critical CSS.

Hard High Impact 2-4 hrs Online Local Hybrid
Pro Tip

Images typically account for 50-70% of page weight. Converting to WebP alone can reduce total page size by 30%+. Start there for the biggest ROI with the least effort.

Step-by-Step Guide

1

Audit with PageSpeed Insights and WebPageTest

Run pagespeed.web.dev for quick scores. For deeper analysis, use webpagetest.org — select a mobile device and a slow 3G connection to simulate worst-case scenarios. Check the waterfall chart to find the biggest bottlenecks.

2

Convert images to WebP/AVIF format

Use Squoosh.app for individual images, or ShortPixel/Imagify for bulk conversion in WordPress. Set quality to 80 for WebP (visually lossless). Use <picture> tag with WebP source and JPEG fallback for older browsers.

3

Implement lazy loading for below-fold images

Add loading="lazy" to all <img> tags below the fold. Do NOT lazy-load your hero image or LCP element — these should load eagerly. Modern browsers support native lazy loading with no JavaScript needed.

4

Minify and bundle CSS/JS files

In WordPress: use WP Rocket or Autoptimize plugins. For custom sites: use build tools like Vite, Webpack, or esbuild. Minification removes whitespace and comments; bundling reduces HTTP requests.

5

Set up a CDN (Cloudflare, Fastly, or CloudFront)

Cloudflare free tier: sign up, add your domain, change nameservers. Enable "Auto Minify" for CSS/JS/HTML and "Brotli" compression. This alone can cut load times by 40-60% for users far from your server.

6

Enable Brotli/Gzip compression

Check if compression is enabled at tools.keycdn.com/brotli-test. In Apache: enable mod_deflate. In Nginx: add "gzip on;" and "brotli on;" directives. Cloudflare enables Brotli automatically.

7

Inline critical CSS, defer non-critical stylesheets

Use tools like critical (npm package) to extract above-the-fold CSS. Inline it in the <head> and defer the full stylesheet with media="print" onload="this.media='all'". This eliminates render-blocking CSS.

Video Tutorial

AI Prompt

Generate page speed optimization code for my [CMS/FRAMEWORK] website:

1. Image optimization script (convert to WebP, generate responsive srcset)
2. Critical CSS extraction and inline loading approach
3. JavaScript defer/async strategy with code example
4. Browser caching headers (.htaccess or nginx config)
5. Lazy loading implementation for images and iframes
6. Resource hints: preconnect, prefetch, preload for key assets
7. CDN configuration recommendations

Tools & Resources

PageSpeed InsightsWebPageTestCloudflare CDNSquoosh Image Optimizer

Learn More

How to Speed Up a Website — CloudflarearticleFast Load Times — web.devofficial

Do this task in the interactive tool

Track your progress and get guided through every step.

Open Interactive Tool

More in Technical SEO

Enforce HTTPS Sitewide

Easy30 min

Optimize Core Web Vitals

Hard2-5 hrs

Configure Robots.txt Properly

Medium20 min

Submit & Optimize XML Sitemap

Easy20 min

Implement Canonical Tags

Medium30 min

Fix Broken Links & Redirect Chains

Medium1-2 hrs

Mobile-First Optimization

Medium1-3 hrs

Manage Crawl Budget

Hard1-2 hrs

JavaScript SEO & Rendering

Hard2-4 hrs

Implement Structured Data (Schema)

Medium1-2 hrs

Set Up Hreflang (International Sites)

Hard1-2 hrs

Clean URL Architecture

Medium30 min

Security Monitoring & Headers

Medium30 min