laravel-sitemap

The Laravel sitemap package generates sitemaps by discovering URLs automatically instead of requiring manual URL entry.

github.com/spatie/laravel-sitemap
laravel-sitemap homepage screenshot

About laravel-sitemap

laravel-sitemap is an open source PHP package for Laravel, released under the MIT license. It generates XML sitemaps by crawling a site from a base URL, so URLs do not have to be added by hand. It can also build a sitemap manually from listed URLs with last modification dates.

The package can split crawled URLs into separate sitemap files, for example one for a blog and one for the rest of the site. The documentation states that this makes it easier to track indexing coverage per section in Google Search Console. The homepage text does not describe usage limits or supported platforms beyond Laravel.

Key features

  • Generates a sitemap by crawling a site from a base URL
  • Builds a sitemap manually from added URLs and modification dates
  • Adds extra URLs to a sitemap generated by crawling
  • Splits crawled URLs into separate sitemap files using a closure
  • Writes an optional sitemap index referencing each generated sitemap file
  • Adds Eloquent models to sitemaps by implementing the Sitemapable interface
Best for: Laravel developers who want XML sitemaps generated automatically or divided by site section.
Good for
  • Open source under the MIT license
  • Supports crawling, manual creation, and a combination of both
  • Models can supply their own sitemap entries through the Sitemapable interface

laravel-sitemap at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

laravel-sitemap alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in SEO & Web Analytics

Well-known listings from the same topic.

All 211

laravel-sitemap FAQ

Can specific URLs be left out of the generated sitemaps?
Yes. Returning null from the closure passed to writeToFile leaves that URL out of every sitemap.
Does the package create a sitemap index file automatically?
No. By default no sitemap index is written. Calling sitemapIndexPath generates an index that references each written sitemap.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing