Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Sitemap Laravel Package

spatie/laravel-sitemap

Generate XML sitemaps for Laravel by crawling your site or building them manually. Add extra URLs, set last-modified dates, and include models via a simple interface. Write sitemaps to disk with a fluent, developer-friendly API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • SEO & Discoverability Roadmap: Accelerates implementation of dynamic sitemaps for content-heavy applications (e.g., blogs, e-commerce, news sites) by automating URL discovery and metadata updates.
  • Build vs. Buy: Eliminates need to build custom crawlers or manual sitemap generators, reducing dev effort and maintenance overhead.
  • Multi-Region/Market Expansion: Enables localized sitemaps (via addAlternate) for international sites without duplicating infrastructure.
  • Headless/JS-Rendered Content: Supports SPAs or sites with client-side routing (via execute_javascript) for comprehensive SEO coverage.
  • Compliance & Crawlability: Ensures compliance with Google News sitemap standards (via addNews) for publishers.
  • Performance Optimization: Allows granular control over crawl depth, concurrency, and URL filtering to balance speed and resource usage.

When to Consider This Package

  • Avoid if:

    • Your site is static (e.g., Jamstack) and uses a pre-built sitemap generator (e.g., next-sitemap, gatsby-plugin-sitemap).
    • You need real-time sitemap updates (this package is optimized for scheduled generation).
    • Your site relies on server-side rendering (SSR) only with no JavaScript-generated links (disables execute_javascript).
    • You require enterprise-grade scalability (e.g., crawling millions of URLs; consider dedicated tools like Screaming Frog or custom solutions).
    • Your team lacks PHP/Laravel expertise (alternatives like sitemap.xml generators for Node.js/Python may be more accessible).
  • Consider alternatives if:

    • You need multi-format sitemaps (e.g., video/image sitemaps; this package focuses on URL-based sitemaps).
    • Your CMS/platform has native sitemap plugins (e.g., WordPress Yoast SEO, Shopify apps).
    • You prioritize developer experience over PHP (e.g., Python’s django-sitemap or JavaScript libraries).

How to Pitch It (Stakeholders)

For Executives:

"This package automates SEO-critical sitemap generation for our Laravel apps, reducing manual effort by 80% while improving search visibility. It supports dynamic content, multilingual sites, and JavaScript-rendered pages—key for our [content/regional expansion] goals. With minimal dev lift, we can ensure Google indexes all critical pages, directly impacting organic traffic and lead gen. The MIT license and Spatie’s track record (2.6K stars) ensure reliability."

For Engineering:

*"Spatie’s Laravel Sitemap package lets us:

  • Crawl and index dynamic routes (e.g., blog posts, product pages) without hardcoding URLs.
  • Filter/optimize crawls (depth, concurrency, exclusions) to balance speed and resource use.
  • Integrate with models via Sitemapable interface for zero-boilerplate sitemap entries.
  • Schedule updates via Laravel’s task scheduler (e.g., daily regenerates).
  • Support JS-heavy sites with headless Chrome rendering (if needed). Tradeoff: Adds ~500KB to deployments; requires PHP 8.0+. Alternatives like manual XML generation or third-party APIs (e.g., DeepCrawl) exist but lack Laravel-native integration."*

For SEO/Content Teams:

*"This tool ensures every new page, blog post, or product launch is automatically added to our sitemap—no more forgotten URLs! We can:

  • Tag content for Google News (critical for publishers).
  • Localize sitemaps for international audiences (e.g., /en, /fr alternates).
  • Prioritize high-value pages by filtering crawl paths (e.g., exclude /admin).
  • Verify updates via scheduled regenerates (e.g., nightly). Ask devs to configure crawl depth/concurrency to avoid overloading servers during peak times."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony