SEO Best Practices
On-Page SEO: Titles, Metas, Headers & Structured Data
Optimize every element of your page — from title tags to JSON-LD — for maximum search visibility.
On-Page SEO: What You Control Directly
On-page SEO covers every element you can optimize on each individual page. It's the most direct lever you have over search rankings.
Title Tags
The title tag is the single most important on-page ranking factor. It appears in search results as the clickable blue headline.
Rules:
- Keep under 60 characters (or it gets truncated in results)
- Put the primary keyword first
- Make it compelling — your CTR affects rankings
- Every page must have a unique title
In Next.js:
export const metadata = {
title: 'Technical SEO for Next.js: The Complete Developer Guide | DevForge',
};Meta Descriptions
Meta descriptions don't directly affect rankings, but they control click-through rate — which does.
Rules:
- Keep under 160 characters
- Include the primary keyword naturally
- Write a compelling summary that makes searchers click your result over others
- Every page must have a unique description
Heading Hierarchy
Headings create structure for both users and crawlers. Rules:
- One H1 per page — it should contain your primary keyword and match the topic of the page
- H2s for major sections — include secondary keywords naturally
- H3s for subsections — never skip levels (no H3 without a parent H2)
Image SEO
Images are opportunities to rank in Google Images and reinforce page relevance:
<!-- Bad -->
<img src="IMG_2847.jpg" />
<!-- Good -->
<img
src="technical-seo-nextjs-guide.webp"
alt="Next.js technical SEO configuration showing generateMetadata function"
width="1200"
height="630"
loading="lazy"
/>Alt text rules: describe the image, include a keyword naturally, max 125 characters, never keyword-stuff.
Structured Data (JSON-LD)
Structured data is machine-readable markup that helps Google understand your content and serve rich results in SERPs — star ratings, FAQ dropdowns, breadcrumbs, and more.
Key schema types:
// Article schema for blog posts
const articleSchema = {
'@context': 'https://schema.org',
'@type': 'Article',
headline: 'Technical SEO for Next.js',
author: { '@type': 'Organization', name: 'DevForge Academy' },
datePublished: '2025-01-01',
};
// FAQPage schema for FAQ sections (shows expanded Q&A in SERPs)
const faqSchema = {
'@context': 'https://schema.org',
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'What is technical SEO?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Technical SEO ensures search engines can crawl, index, and rank your pages.',
},
},
],
};Validate your structured data with Google's Rich Results Test before launching.
Internal Linking
Every page should link to 3–5 other relevant pages. Anchor text should be descriptive — not "click here" but "technical SEO guide for Next.js."
Internal links:
- Distribute authority from high-traffic pages to newer pages
- Help Google understand page relationships and site structure
- Reduce crawl depth for deeper pages
Featured Snippet Optimization
Featured snippets appear above organic results — getting one effectively gives you position #0.
Tactics:
- Answer the query directly in the first 100 words of your content
- Use definition paragraphs (term: definition)
- Use numbered lists for processes
- Use comparison tables for comparisons
- Add a "Key Takeaways" section at the end of every article
Key Takeaways
- Title tags are the most important on-page ranking factor — keyword-first, under 60 chars, unique per page
- Meta descriptions don't directly affect rankings but control CTR — make them compelling
- One H1 per page, H2s for sections, never skip heading levels
- JSON-LD structured data unlocks rich results in SERPs — Article, FAQPage, and BreadcrumbList are the most valuable
- Featured snippets require direct, structured answers in the first 100 words of your content
---
Try It Yourself: Audit a single blog post for on-page SEO completeness. Check: title tag (length and keyword position), meta description (length and CTR appeal), H1 (unique and contains keyword), heading hierarchy (no skipped levels), image alt text on every image, 3+ internal links, and valid JSON-LD. Fix any issues you find.