1. 12
    Generate a Sitemap in Astro with the sitemap Integration
    6m 55s

Generate a Sitemap in Astro with the sitemap Integration

InstructorLazar Nikolov

Share this video with your friends

Send Tweet

Astro provides a sitemap integration to make it easy for you to set up your websites sitemap.

Sitemaps are important for allowing search engines to efficiently crawl and index the pages of your website.

To add the sitemap integration you just need to run npx astro add sitemap and add the integration to the integrations array in the config.

From there you can configure your sitemap how you'd expect. You can filter out any pages you don't want in there, add custom pages, adjust the change frequency, modify date, and priority.

You can also serialize your urls (e.g. remove the trailing slash) and add localization properties.