Base-Blog

Command Palette

Search for a command to run...

5 min readBase Dev

SEO Best Practices for Modern Blogs

Learn how to implement comprehensive SEO features including meta tags, Open Graph, Twitter cards, JSON-LD structured data, sitemaps, and RSS feeds.

Search Engine Optimization (SEO) is crucial for any blog. This template comes with comprehensive SEO features built-in to ensure your content is discoverable and fast.

What's Included#

  • Meta Tags: Complete meta tag implementation for all pages.
  • Open Graph: Perfect social media sharing cards.
  • Twitter Cards: Optimized Twitter/X previews.
  • JSON-LD: Structured data for rich search results.
  • Sitemap: Auto-generated sitemaps for SEO.
  • RSS Feed: Built-in RSS 2.0 feed support.

Meta Tags#

Every page includes a complete set of meta tags:

Basic Meta Tags#

<title>Post Title | Site Name</title>
<meta name="description" content="Post description...">
<meta name="keywords" content="keyword1, keyword2, keyword3">
<meta name="author" content="Author Name">

Robots#

<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow, max-snippet:-1">

Open Graph Tags#

Open Graph tags ensure your content looks great when shared on social platforms like Facebook and LinkedIn:

<meta property="og:type" content="article">
<meta property="og:title" content="Post Title">
<meta property="og:description" content="Post description...">
<meta property="og:url" content="https://example.com/blog/post-slug">
<meta property="og:site_name" content="Site Name">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://example.com/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<!-- Article-specific -->
<meta property="article:published_time" content="2026-01-28">
<meta property="article:author" content="Author Name">
<meta property="article:tag" content="tag1">

Twitter Cards#

Twitter (X) cards make your content stand out in timelines:

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@yourusername">
<meta name="twitter:creator" content="@yourusername">
<meta name="twitter:title" content="Post Title">
<meta name="twitter:description" content="Post description...">
<meta name="twitter:image" content="https://example.com/og-image.png">

JSON-LD Structured Data#

Structured data helps search engines understand your content better and enables rich results. Here are the schemas we implement:

Structured data helps search engines understand your content better and enables rich results. Here are the schemas we implement:

WebSite Schema#

{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Site Name",
"description": "Site description...",
"url": "https://example.com",
"potentialAction": {
"@type": "SearchAction",
"target": "https://example.com/search?q={search_term}",
"query-input": "required name=search_term"
}
}

Article Schema#

{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Post Title",
"description": "Post description...",
"image": "https://example.com/post-image.png",
"datePublished": "2026-01-28",
"dateModified": "2026-01-28",
"author": {
"@type": "Person",
"name": "Author Name"
},
"publisher": {
"@type": "Organization",
"name": "Site Name",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
}
}
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://example.com"
},
{
"@type": "ListItem",
"position": 2,
"name": "Blog",
"item": "https://example.com/blog"
},
{
"@type": "ListItem",
"position": 3,
"name": "Post Title",
"item": "https://example.com/blog/post-slug"
}
]
}

Sitemap#

The template automatically generates a sitemap at /sitemap.xml with:

  • All static pages
  • All blog posts with last modified dates
  • Category archive pages
  • Tag archive pages
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com</loc>
<lastmod>2026-01-30</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/blog/getting-started</loc>
<lastmod>2026-01-30</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<!-- More URLs... -->
</urlset>

Robots.txt#

A properly configured robots.txt is generated at /robots.txt:

User-agent: *
Allow: /
Disallow: /api/
Disallow: /_next/
Sitemap: https://example.com/sitemap.xml
Host: https://example.com

RSS Feed#

An RSS 2.0 feed is available at /feed.xml for readers who prefer RSS:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Site Name</title>
<description>Site description...</description>
<link>https://example.com</link>
<item>
<title>Post Title</title>
<description>Post description...</description>
<link>https://example.com/blog/post-slug</link>
<pubDate>Sun, 28 Jan 2026 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>

Canonical URLs#

Every page includes a canonical URL to prevent duplicate content issues:

<link rel="canonical" href="https://example.com/blog/post-slug">

When writing blog posts, follow these SEO best practices:

  1. Write Great Titles: Create descriptive, keyword-rich titles between 50-60 characters.
  2. Craft Compelling Descriptions: Write meta descriptions that are 150-160 characters and entice clicks.
  3. Use Proper Headings: Follow heading hierarchy: H1 (one per page) → H2 → H3 for better structure.
  4. Add Alt Text: Include descriptive alt text for all images for accessibility and SEO.
  5. Link Internally: Include internal links to related content to improve site navigation.
  6. Use Descriptive URLs: Create clean, descriptive URLs (slugs) that reflect the content.
  7. Add Tags & Categories: Use relevant tags and categories to organize your content.
  8. Keep Content Fresh: Regularly update your content to maintain relevance.

Quick SEO Tips#

  • How long should my blog post title be? Aim for 50-60 characters. This ensures your title displays fully in search results without being truncated.
  • What's the ideal meta description length? Between 150-160 characters. This gives enough space for a compelling summary while fitting in search results.
  • Should I use the same keywords in every post? No! Each post should target different, relevant keywords to avoid competing with yourself in search results.
  • How often should I update my content? Review and update your most important posts every 6-12 months to keep them current and relevant.
  • Do I need to manually create a sitemap? No! This template automatically generates and updates your sitemap whenever you add or modify content.

Helpful Resources#

Conclusion#

This template handles all the technical SEO for you. Just focus on:

  • Writing Quality Content: Focus on value, clarity, and engagement.
  • Filling Frontmatter: Add complete metadata to every post.
  • Using Proper Headings: Structure your content logically.
  • Adding Relevant Tags: Help readers and search engines categorize.

The template takes care of the rest—meta tags, structured data, sitemaps, and feeds are all generated automatically.

Remember: Great SEO starts with great content. All the technical optimization in the world won't help if your content doesn't provide value to readers.

Happy writing, and may your content rank well!

Download This Boilerplate ⚡