Skip to content

cwray-tech/laravel-large-website-sitemap-example

Repository files navigation

Laravel Large Website Sitemap Example

Create a sitemap for a large website

If you ever wanted to build a sitemap for a large website built in Laravel, you may have wondered how to do it. This repository is an example of one way you could build your sitemap in Laravel.

About this project

This is a simple Laravel 8 project that shows how you can create a custom sitemap in Laravel for a web application that contains thousands of records. Most everything is translatable to any Laravel version.

You can read the full tutorial on my website here.

You can also view this sample application deployed here.

Are you looking for someone to join your team? I would be happy to chat with you about it. Find my contact info here.

Note: NOT a good way of solving this problem, entirely.

As this kind person responded in Laracasts, it is better to chunk the results and show results in a set number of records. For example, you could have thousands of records that begin with the letter "b", and in that case, your sitemap.xml for that letter would still load insanely slow.

In order to prevent that issue from taking place, you will want to ensure that records are chunked so that the app only loads a few hundred or so records at once.

You can learn more about chunking results on the Laravel Docs website.

About

Laravel 8 application that shows how to generate a sitemap for a site with thousands of records.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published