Documentation, articles, or durable service pages
- Good starting point
- Prerender at build time.
- Check
- Generated paths and metadata exist in the build output.
Set up Astro SEO around the deployed origin, standard HTML metadata, static versus SSR routes, internal links, and sitemap coverage.
Astro uses standard HTML tags for SEO metadata; add title, description, canonical, social, and robots tags to each page's head. Set site in astro.config.mjs to the production origin and base only for a subpath deployment. Check generated routes against deployed URLs, choose static or SSR output by page needs, and inspect built HTML before publishing.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
site to the canonical production origin. Astro says it uses this URL "to generate your sitemap and canonical URLs in your final build" and strongly recommends setting it. Set base if the site is deployed below a path such as /docs; Astro then expects asset imports and URLs to carry that prefix (import.meta.env.BASE_URL).site; preview builds should not publish preview URLs as canonical references.base only when the deployment actually serves the project from a path prefix. Ensure links, canonical URLs, and sitemap entries include that base consistently.trailingSlash defaults to 'ignore' and controls route matching in the dev server and on-demand rendered pages. Astro says trailing slashes on prerendered pages are handled by the hosting platform and may not respect your setting, so inspect deployed routes rather than assuming local behavior is identical.import { defineConfig } from 'astro/config'
export default defineConfig({
site: 'https://www.example.com',
base: '/docs',
trailingSlash: 'always',
})Astro's sitemap integration uses the site value to write absolute URLs. See Astro sitemap setup for generated route coverage and the SSR limitation.
getStaticPaths(), but "cannot generate sitemap entries for dynamic routes in SSR mode".getStaticPaths() returns the intended canonical paths and build can handle the volume.For a hybrid project, check the rendered route, not just the overall Astro mode. A page that appears after client JavaScript runs may not provide the same first response that a static HTML page provides.
Check source HTML for title, description, canonical, language, robots, heading, and primary content across one route per template.
Request the slash and non-slash variants, old URLs, and common query variants. Confirm they resolve to one canonical route without a chain.
Use the correct production sitemap index in robots.txt and submit it under the matching Search Console property.
Inspect the final page for oversized scripts, unoptimized images, layout shifts, and inaccessible navigation. Keep client islands only where interaction needs them.
Compare query and page results, inspect indexing exclusions, and use URL Inspection to diagnose important URLs that are crawled but not indexed.
For Google's principles, see the SEO Starter Guide. Sitemap submission helps discovery but does not guarantee crawling or indexing.
4 questions people ask next, answered from the sources on this page.
Astro's config is for build and rendering settings, not common SEO metadata. Add standard HTML title, meta, and link tags to the page head, usually through a shared layout with route-specific values.
Astro uses the full URL in site to generate your sitemap and canonical URLs in the final build. Set it to the production origin, not a local or preview domain.
The official integration includes statically generated routes, including getStaticPaths() output, but Astro says it cannot generate sitemap entries for dynamic routes in SSR mode.
Astro can build large static route sets, but you should test build time, output size, and route completeness. Make sure each indexed page has distinct value and is linked from useful site sections.
Run the free audit, then approve the fixes. Every change can be undone.