Struggling with 'Dynamic XML Sitemap' for Laravel SEO; seeing unexpected caching issues after recent deployment

Author
Ji-woo Takahashi Author
|
1 day ago Asked
|
5 Views
|
0 Replies
0

Hey everyone, just looking for some advice here. we've been using our 'Dynamic XML Sitemap for Laravel & All Websites' package for a while now to help with our Laravel SEO, and it's generally been great. But after a recent deployment, we're hitting a weird wall.

  • The Core Problem: Our sitemap isn't updating dynamically on production, even though it works fine locally. it seems stuck on an older version for hours, sometimes even a full day.
  • What We've Tried So Far:
    • Cleared all Laravel caches (`php artisan cache:clear`, `config:clear`, `route:clear`, `view:clear`).
    • Checked cron jobs for the sitemap generation command โ€“ they show as running successfully.
    • Verified database entries for dynamically added URLs; new content is definitely in the DB.
    • Even tried manually running the sitemap generation command on production via SSH.
  • Expected vs. Actual: We expect the sitemap to reflect new content almost immediately after generation. Instead, Google Search Console is still picking up stale content, and when we hit the sitemap URL directly in the browser, it shows outdated URLs.
  • Here's what a typical console output looks like, followed by checking the sitemap:
    php artisan sitemap:generate
    Sitemap generated successfully! Total URLs: 12345
    
    // ... a few minutes later, checking the sitemap URL directly ...
    
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
      <url>
        <loc>https://example.com/old-page</loc>
        <lastmod>2023-10-26T10:00:00+00:00</lastmod>
      </url>
      // ... missing all new pages from today ...
    </urlset>
  • Seeking Your Wisdom: Has anyone faced something similar with large-scale dynamic sitemaps in a Laravel production enviroment? Could it be web server caching (Nginx/Apache) or perhaps a CDN issue I'm overlooking that's interfering with our Laravel SEO efforts? We're really baffled by this persistent Laravel caching behavior. Any tips on debugging persistent sitemap caching for this kind of setup?

Thanks in advance!

0 Answers

No answers yet.

Be the first to provide a helpful answer!

Your Answer

You must Log In to post an answer and earn reputation.