Package

Spatie Laravel Sitemap

Create and generate sitemaps with ease

Package

spatie/laravel-sitemap

View on GitHub →

Overview

What Spatie Laravel Sitemap does

Spatie's Laravel Sitemap simplifies the process of generating sitemaps by crawling your entire site to automatically include all URLs.

For developers maintaining websites with many pages, building a complete and up-to-date sitemap can be a challenge. Spatie's Laravel Sitemap automates this task by crawling your entire site and generating a sitemap file effortlessly. This eliminates the need to manually add URLs, which makes keeping sitemaps current far less cumbersome.

Developers can execute this task with a straightforward Artisan command, which allows the entire site to be crawled and sitemaps to be generated directly to a file. For those who need a more customized approach, the package allows manual creation as well, where specific URLs can be added with details such as last modification dates. This flexibility means sitemaps can be fully automated, completely manual, or a mix of both.

An advanced feature of the package is its capability to split crawled URLs into multiple sitemap files. This feature is particularly useful for large sites, allowing content to be organized into logical sections, which can improve tracking and indexing in platforms like Google Search Console. This is accomplished by passing a closure that determines the path of each sitemap, and additional options allow the creation of sitemap indexes and the grouping of URLs into multiple files if limits are reached.

Laravel Sitemap also integrates seamlessly with Eloquent models, allowing models to implement a Sitemapable interface to directly add them to sitemaps. This feature gives developers precision control over how dynamic content is represented in the sitemap, further extending the package's flexibility and usefulness across different types of Laravel applications.

This overview was generated by AI from the package README and may not reflect the latest release.

Read the full README →

Spatie Laravel Sitemap Related Articles

Building a Search Engine Friendly Sitemap XML with Laravel image

Building a Search Engine Friendly Sitemap XML with Laravel

Read article
Building a Sitemap in your Laravel app with the Spatie Sitemap image

Building a Sitemap in your Laravel app with the Spatie Sitemap

Read article
Media Library Pro: Vue, React and Blade components to handle uploads (sponsor) image

Media Library Pro: Vue, React and Blade components to handle uploads (sponsor)

Read article
Spatie Shares Their Coding Guidelines as AI Skills image

Spatie Shares Their Coding Guidelines as AI Skills

Read article
Image Optimization With Spatie Laravel Image Optimizer image

Image Optimization With Spatie Laravel Image Optimizer

Read article
Cartographer – PHP Sitemap Generator image

Cartographer – PHP Sitemap Generator

Read article

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift