Cron Jobs
To keep your sitemap up-to-date for search engines, you need to set up a cron job.
Log in to your server's control panel (cPanel, Plesk, etc.).
Find the "Cron Jobs" section.
Add a new cron job using the command below. Set it to run once a day.
Bash
0 * * * * cd /path/to/your/project && php artisan sitemap:generate > /dev/null 2>&1
Note: Replace /path/to/your/project
with the actual absolute path to your script's root directory on the server.
Last updated