🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
SEO••By Komal Nakrani

Astro SEO Tools: Integrations, Packages and Checkers

The Astro SEO tools worth using: sitemap and RSS integrations, meta and JSON-LD helpers, OG image generators, plus the free checkers that verify your pages.

#Astro#SEO Tools#SEO#Sitemap#JSON-LD

The Astro SEO tools worth installing are few: @astrojs/sitemap for the sitemap, @astrojs/rss for feeds, a head component (your own or the community astro-seo package) for meta tags, schema-dts for typed JSON-LD, and an Open Graph image generator. Everything else is checking: Google Search Console, Bing Webmaster Tools, PageSpeed Insights, the Rich Results Test and a site crawler.

This list groups the tools by job, says what each one is good for, and notes where Astro’s built-in features already cover the need.

Key Takeaways

  • Astro already outputs fast, crawlable HTML. Most SEO work is metadata, sitemaps and structured data.
  • Install @astrojs/sitemap with npx astro add sitemap, and set site in astro.config.mjs first.
  • A 30-line SEO.astro component is often better than a dependency, but astro-seo is a reasonable shortcut.
  • Use schema-dts to type JSON-LD so invalid properties fail in your editor.
  • Verify with Search Console, Bing Webmaster Tools, the Rich Results Test and PageSpeed Insights, all free.

Why Astro needs fewer SEO tools than most frameworks

Many SEO plugins exist to fix problems Astro doesn’t have: client-rendered content crawlers can’t see, bloated JavaScript, slow server responses. Astro renders complete HTML at build time and ships no JavaScript by default, so search engines and AI crawlers read your pages as plain documents.

What Astro leaves to you is metadata: titles, descriptions, canonicals, Open Graph tags, sitemaps, feeds and structured data. The tools below cover those. For the full process, the Astro SEO checklist walks through every step.

Official integrations

@astrojs/sitemap

The official sitemap integration generates sitemap-index.xml and numbered sitemap files on every build, including pages from getStaticPaths().

npx astro add sitemap
// astro.config.mjs
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';

export default defineConfig({
  site: 'https://www.example.com',
  integrations: [
    sitemap({
      filter: (page) => !page.includes('/thank-you/'),
    }),
  ],
});

Good for: every site. It needs site set, supports filtering, i18n alternates and custom lastmod via serialize. The sitemap tip covers the options, and the official sitemap docs list them all.

@astrojs/rss

The official RSS helper builds a feed from an endpoint. Feeds matter for SEO indirectly: they help aggregators and some crawlers discover new posts quickly.

// src/pages/rss.xml.ts
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
import type { APIContext } from 'astro';

export async function GET(context: APIContext) {
  const posts = await getCollection('blog');
  return rss({
    title: 'Example Blog',
    description: 'Guides and notes.',
    site: context.site!,
    items: posts.map((p) => ({ title: p.data.title, pubDate: p.data.pubDate, link: `/blog/${p.id}/` })),
  });
}

Good for: blogs, changelogs and news sections. The RSS feed guide adds full-content feeds and styling.

Built-in features that replace plugins

Astro covers several “SEO plugin” jobs without any package:

Job Built-in feature
Image optimization and dimensions <Image /> and <Picture /> from astro:assets
Redirects redirects in astro.config.mjs
Trailing slash consistency trailingSlash and build.format
Prefetching for faster navigation prefetch config option
robots.txt a file in public/ or a robots.txt.ts endpoint
Canonical URLs new URL(Astro.url.pathname, Astro.site)

Meta tag helpers

Your own SEO component

For most sites, a single component with typed props is the best “tool”: no dependency, exactly the tags you need, easy to read. The meta tags component guide builds one step by step.

astro-seo

astro-seo is a popular community package that renders title, description, canonical, Open Graph and Twitter tags from one component:

---
// src/layouts/BaseLayout.astro (head excerpt)
import { SEO } from 'astro-seo';
const { title, description } = Astro.props;
---
<SEO
  title={title}
  description={description}
  canonical={new URL(Astro.url.pathname, Astro.site).href}
  openGraph={{ basic: { title, type: 'website', image: new URL('/og/default.jpg', Astro.site).href } }}
  twitter={{ card: 'summary_large_image' }}
/>

Good for: getting complete tags quickly without writing them by hand. Watch for: it’s community-maintained, so check its last release supports your Astro version.

Structured data tools

schema-dts

schema-dts is a TypeScript type package for Schema.org, published by Google. It adds no runtime code; it just types your JSON-LD objects:

---
// src/components/ArticleSchema.astro
import type { WithContext, BlogPosting } from 'schema-dts';

interface Props {
  title: string;
  description: string;
  published: Date;
  url: string;
}
const { title, description, published, url } = Astro.props;

const schema: WithContext<BlogPosting> = {
  '@context': 'https://schema.org',
  '@type': 'BlogPosting',
  headline: title,
  description,
  datePublished: published.toISOString(),
  mainEntityOfPage: url,
};
---
<script type="application/ld+json" set:html={JSON.stringify(schema)} />

A typo such as datePublised becomes an editor error instead of silently invalid markup. The JSON-LD guide covers FAQ, Product and Breadcrumb schemas.

Validators

  • Rich Results Test (Google): shows which rich result types a page qualifies for.
  • Schema Markup Validator (schema.org): checks syntax against the full vocabulary, including types Google doesn’t use.

Test a deployed URL or paste the built HTML from dist/.

Open Graph image generators

Social previews don’t affect rankings directly, but they affect clicks from social and chat apps. Popular approaches in Astro:

  • Satori with resvg: render JSX-like markup to SVG, then to PNG, in an endpoint at build time. Full control over layout.
  • Community OG integrations: several packages generate images from a simple config of title, description and colors. Check maintenance status before adopting one.
  • An external image service: an edge function or third-party service that renders images from URL parameters at request time. Useful when the site has thousands of pages.
  • Static images: one hand-designed image per section, referenced from frontmatter. Simplest and often enough.

The OG image generation guide compares them with code.

Checking and monitoring tools

These are free and should be set up on every production site:

Tool What you get
Google Search Console indexing status, queries, clicks, Core Web Vitals field data, sitemap submission
Bing Webmaster Tools Bing indexing and queries; some AI search tools draw on the Bing index
IndexNow instant URL submission to Bing, Yandex and other participating engines
PageSpeed Insights Lighthouse lab scores plus real-user Chrome data
Rich Results Test structured data eligibility
Ahrefs Webmaster Tools free site audit and backlink data for verified sites

The Search Console tip shows verification for Astro sites, and the IndexNow tip automates submission after deploys.

Crawlers for site audits

A crawler visits every page like a search engine and lists problems: missing titles, duplicate descriptions, broken links, redirect chains, missing canonicals.

  • Screaming Frog SEO Spider: the standard desktop crawler; the free version crawls up to 500 URLs.
  • Ahrefs Webmaster Tools site audit: cloud crawler for verified sites.
  • A link checker in CI, such as linkinator over dist/, catches broken internal links before deploy.

Crawl your local build with astro preview running, so you find issues before they go live. Compare each crawl with the previous one: a sudden jump in redirects or missing descriptions usually points to a template change, not a single bad page. Fixing the template fixes every page that uses it, which is one of the quiet advantages of a component-based site.

A sensible tool stack

  1. Set site, add @astrojs/sitemap, and add @astrojs/rss if you publish posts.
  2. Write one SEO.astro component, or use astro-seo.
  3. Add JSON-LD typed with schema-dts for articles, products or FAQs.
  4. Generate or design OG images.
  5. Verify in Search Console and Bing Webmaster Tools, submit the sitemap, and crawl once a month.

Komal Astro themes are static Astro projects, so all of these tools work with them without changes; the Astro config docs show where the site option and integrations go.

FAQ

What is the best SEO plugin for Astro?

There’s no single plugin like on WordPress, because Astro already outputs fast, crawlable HTML. Use @astrojs/sitemap for sitemaps, a head component or astro-seo for meta tags, and schema-dts for typed structured data.

Is Astro good for SEO?

Yes. Astro renders full HTML at build time, ships no JavaScript by default and produces small, fast pages, which suits both search engines and AI crawlers. You still need to add titles, descriptions, canonicals, a sitemap and structured data yourself.

How do I add a sitemap to Astro?

Run npx astro add sitemap, set site in astro.config.mjs to your production URL, and build. The integration writes sitemap-index.xml to dist/, which you then submit in Google Search Console.

Do I need astro-seo?

No. It’s a convenience package. A small custom component with a title, description, canonical and Open Graph tags does the same job with no dependency. Use astro-seo if you want a ready-made, well-documented component.

How do I check structured data on an Astro site?

Deploy the page, or open the built HTML, and run it through Google’s Rich Results Test and the Schema Markup Validator. Typing your JSON-LD with schema-dts catches many mistakes earlier, in the editor.