← Tool directory
TOOL PROFILE

Spatie Laravel Sitemap

Generate XML sitemaps from a Laravel site crawl or from explicitly supplied URLs.

Open source

Community support

Upvotes come from SearchEngineAnswer members. GitHub stars and reader reviews are counted separately.

Claim this tool if you maintain it.

Best for
Publishing
Setup required
A compatible Laravel application, PHP and Composer.
Costs to check
Budget for development and scheduled generation. JavaScript rendering adds browser dependencies if needed.
License in catalog
MIT

GitHub repository

GitHub stars
2,619
Forks
295
Last push
2026-11-05
Primary language
PHP

GitHub snapshot from . Stars count GitHub bookmarks. Reader ratings appear separately below.

How to install Spatie Laravel Sitemap

  1. In a Laravel checkout, verify the package's Composer constraints against the application's PHP and Laravel versions.
  2. Run composer require spatie/laravel-sitemap and choose a writable output file in a staging environment.

First tutorial for Spatie Laravel Sitemap

  1. Generate XML for a small staging site with SitemapGenerator::create using the staging origin and writeToFile using the chosen path.
  2. Inspect the loc elements and verify that a known public route appears once while a private route stays out.

Official installation and usage documentation ↗

Where Spatie Laravel Sitemap fits

Use this when a Laravel application needs sitemap XML driven by its routes or publishing model.

When to choose another tool
Use your CMS sitemap feature when it already covers the relevant content types and canonical URLs.
First evaluation
Generate a sitemap from a small staging site or from a controlled list of public routes.
How to interpret the result
Check entries against your canonical URLs and publishing rules. Generating XML does not establish indexability or indexing.

Reviews and discussion

Reader reviews

Be the first to share your experience with this tool.

Discussion

Ask a question or share a setup tip.

Write a review or join the discussion

Reviews should describe your own experience. All submissions are moderated.

Flag an outdated detail

Include the field that needs updating and a source link. Copy your draft, then use the corrections policy to contact the editorial team.