SEO Guide
On-Page SEO: The Complete Guide
On-page SEO is the set of optimizations you control directly on your website. This guide covers every element that influences how search engines understand and rank your pages, from title tags to image alt text.
Prerequisites
- A list of target keywords mapped to specific pages on your site
- Access to your website's CMS or HTML for making on-page changes
- A site crawling tool like Screaming Frog to audit current on-page elements
- Basic understanding of HTML tags and page structure
Heading Hierarchy
HTML heading tags (H1 through H6) create a hierarchical outline of your page content. They serve two critical purposes: helping users scan and navigate your content, and helping search engines understand the topical structure and relative importance of different sections. Google's John Mueller has confirmed that headings help Google understand the structure of content on a page.
H1 Tag Best Practices
Every page should have exactly one H1 tag that clearly describes the page's primary topic. Include your primary keyword in the H1, but write it as a natural, readable headline rather than a keyword-stuffed phrase. The H1 should be different from the title tag, though they can be similar. The title tag is what appears in search results, while the H1 is what users see on the page itself. Think of the H1 as the headline of a newspaper article.
Structuring H2 and H3 Tags
Use H2 tags for major sections and H3 tags for subsections within those sections. This nesting creates a logical outline that both users and search engines can follow. Incorporate secondary and related keywords into your H2 and H3 tags where it reads naturally. Don't skip heading levels (going from H2 to H4 without an H3) as this breaks the logical hierarchy. A well-structured heading outline should make sense if you read only the headings and nothing else.
SEO Impact of Proper Headings
Properly structured headings increase the likelihood of your content appearing in featured snippets and People Also Ask boxes. Google often pulls content from sections with clear H2 or H3 headings that directly answer a question. Pages with well-organized heading structures also tend to have lower bounce rates and higher time-on-page because users can quickly find the information they're looking for. A Semrush study found that 47% of articles ranking in the top 10 used H2, H3, and H4 tags consistently.
One H1 Per Page
Use a single H1 tag that includes your primary keyword and clearly describes the page topic. Make it different from but related to your title tag.
Logical Nesting
Use H2 for major sections, H3 for subsections, and H4 for sub-subsections. Never skip heading levels in the hierarchy.
Include Keywords Naturally
Incorporate secondary keywords into H2 and H3 tags where they read naturally. Don't force keywords into every heading.
Think Outline First
Draft your heading structure before writing content. If the headings alone tell a coherent story, your structure is solid.
Content Optimization
Content optimization goes beyond keyword placement. It's about creating the most useful, complete, and well-structured page for a given query. Google's helpful content system evaluates whether content is created for users or primarily for search engines, and pages that prioritize user value consistently outperform those focused on keyword density and technical tricks.
Keyword Placement and Density
Include your primary keyword in the first 100 words of your content, in at least one H2 or H3 heading, and naturally throughout the body. There is no ideal keyword density percentage. Instead, focus on comprehensive topic coverage using related terms, synonyms, and semantically connected concepts. Tools like Clearscope, Surfer SEO, and MarketMuse can identify the related terms that top-ranking pages use, helping you ensure topical completeness without keyword stuffing.
Content Structure and Readability
Break content into scannable sections with clear subheadings, short paragraphs (2-4 sentences), and visual elements like lists, tables, and images. Use bullet points and numbered lists for multi-part information. Web users scan before they read, and content that walls them with dense paragraphs gets abandoned. Aim for a reading level of grade 8-10 for most audiences, using tools like Hemingway Editor to check readability.
Matching Search Intent
Before optimizing, analyze the top 10 results for your target keyword. Note the dominant content type (article, product page, tool), format (listicle, how-to, comparison), and angle (beginner, expert, updated). Your content needs to match the dominant intent or it won't rank. Then differentiate through better depth, fresher data, original insights, or superior presentation. Simply matching what exists isn't enough; you need to be measurably better in at least one dimension.
Keyword in First 100 Words
Mention your primary keyword naturally within the opening paragraph to immediately signal relevance to search engines and readers.
Use Semantic Keywords
Include related terms, synonyms, and topically connected concepts throughout your content rather than repeating the exact keyword.
Optimize Readability
Write short paragraphs, use subheadings every 200-300 words, and include lists and visual elements to make content scannable.
Match and Exceed SERP Intent
Analyze the top 10 results to understand the expected format and depth, then create something measurably better.
Internal Linking
Internal links are one of the most underused on-page SEO tools. They help search engines discover your content, understand your site's topical structure, and distribute PageRank across your pages. A deliberate internal linking strategy can significantly improve rankings for important pages without building a single external backlink.
Strategic Internal Link Architecture
Your most important pages should receive the most internal links from across your site. Identify your 10-20 most important pages, then look for opportunities to link to them from related content. Use descriptive, keyword-rich anchor text that tells both users and search engines what the linked page is about. Avoid generic anchor text like "click here" or "learn more" because it wastes an opportunity to pass topical relevance.
Contextual Linking Best Practices
Add internal links within the body content where they naturally support the reader's journey. Don't cluster all links at the beginning or end of a page. Link to deeper pages, not just your homepage and main category pages, as these deeper pages often need the most linking support. Aim for 3-5 internal links per 1,000 words of content, but let the content guide the number rather than hitting an arbitrary target. Every link should make sense to a reader and provide genuine value.
Avoiding Common Internal Linking Mistakes
Don't use the same anchor text for links to different pages, as this creates ambiguity. Don't create orphan pages that have no internal links pointing to them. Regularly audit for broken internal links that lead to 404 pages. Avoid excessive linking on a single page (more than 100-150 internal links), as this can dilute link equity and overwhelm users. Use tools like Screaming Frog to visualize your internal link structure and identify pages with too few or too many links.
Prioritize Important Pages
Ensure your most valuable pages receive the most internal links. Create a list of priority pages and actively seek linking opportunities.
Use Descriptive Anchor Text
Write anchor text that describes the linked page's content using relevant keywords. Avoid generic phrases like 'click here' or 'read more.'
Link Deep
Don't just link to your homepage and top-level categories. Direct links to deeper, specific pages where they need the most support.
Fix Orphan Pages
Audit your site for pages with zero internal links pointing to them. Add contextual links from relevant pages to eliminate orphans.
Image Optimization
Images can be both an SEO asset and a performance liability. Properly optimized images contribute to rankings through Google Image Search, enhance user experience, and provide additional context to search engines. Unoptimized images, however, are the single biggest contributor to slow page load times, which directly impacts Core Web Vitals and user engagement.
Alt Text and File Names
Write descriptive alt text for every image that conveys what the image shows and, where appropriate, includes a relevant keyword. Alt text serves as the text alternative for screen readers, making it essential for accessibility. It's also the primary signal Google uses to understand image content. Keep alt text concise (under 125 characters) and descriptive rather than stuffing it with keywords. Rename image files with descriptive, hyphenated names before uploading: "keyword-research-process-diagram.webp" is far more useful than "IMG_4523.jpg."
Image Compression and Format
Serve images in modern formats like WebP or AVIF, which provide 25-50% smaller file sizes than JPEG and PNG without visible quality loss. Use responsive images with srcset attributes to serve appropriately sized images for each device. Compress images before uploading using tools like TinyPNG, ShortPixel, or Squoosh. For above-the-fold images, inline small images or use preload hints to prevent them from causing layout shifts.
Lazy Loading and Performance
Implement lazy loading for images below the fold so they only load when users scroll to them. Use the native loading="lazy" HTML attribute for the simplest implementation. Never lazy-load your Largest Contentful Paint (LCP) element, as this delays the most critical Core Web Vitals metric. Set explicit width and height attributes on all images to prevent Cumulative Layout Shift (CLS) as images load. A 2025 HTTP Archive analysis found that images account for an average of 42% of total page weight, making image optimization one of the highest-impact performance improvements you can make.
Write Descriptive Alt Text
Describe what the image shows in under 125 characters. Include relevant keywords where natural, but prioritize accuracy and accessibility.
Use Modern Image Formats
Serve images in WebP or AVIF format for 25-50% smaller file sizes. Fall back to JPEG for browsers that don't support modern formats.
Compress Before Uploading
Run all images through compression tools before uploading. Target file sizes under 100KB for standard images and under 200KB for hero images.
Implement Lazy Loading
Add loading='lazy' to images below the fold. Never lazy-load the LCP image. Always set explicit width and height dimensions.
Related Content
How to Optimize Content for Search Engines
Learn how to audit, optimize, and update your website content for better search rankings with this practical content optimization guide for 2026.
How to Do Keyword Research: Step-by-Step
Learn how to find and prioritize the right keywords for your business with this step-by-step keyword research guide covering search intent, competition, and more.
Link Building Strategies That Actually Work
Learn proven link building strategies including content-driven outreach, digital PR, and relationship building that earn high-quality backlinks in 2026.
How to Do an SEO Audit
Learn how to conduct a comprehensive SEO audit covering technical issues, on-page optimization, off-page factors, and how to build a prioritized action plan.