- What is rapidez/sitemap used for in a Laravel ecommerce site?
- rapidez/sitemap generates XML sitemaps for Rapidez storefronts, helping expose product, category, and content URLs to search engines. It is aimed at improving crawl coverage and discoverability for Laravel-powered ecommerce sites. The package is configurable so you can tailor sitemap output to your storefront's URL structure and SEO needs.
- How do I install rapidez/sitemap in a Rapidez storefront?
- Install it with Composer using composer require rapidez/sitemap in your Laravel project. Then review the package configuration and publish any config files needed by your Rapidez setup. After installation, generate the sitemap and verify the route or output file in your local storefront before deploying.
- How do I configure which product and category URLs appear in the sitemap?
- Use the package configuration to control the sitemap contents and URL generation for your Rapidez storefront. You should exclude unavailable, noindex, or otherwise non-canonical product and category URLs so search engines only see indexable pages. Confirm the generated XML against your Rapidez routes and canonical URL rules.
- Which Laravel versions are supported by rapidez/sitemap?
- The package targets Rapidez storefronts, which run on Laravel, so you should match its Laravel constraint to the Rapidez release you use. Check the package composer.json and release notes before upgrading Laravel or Rapidez. If you maintain a custom Rapidez stack, test sitemap generation after framework upgrades.
- How can I test that my Laravel sitemap returns valid XML?
- Write a feature test that requests your sitemap endpoint and asserts a successful status plus XML content type. Then assert that expected product, category, and content URLs are present and that excluded URLs are absent. You can also open the sitemap in a browser or XML validator during local development.
- How should I handle large product catalogs when generating a sitemap?
- For large Rapidez catalogs, avoid regenerating the full sitemap on every request. Generate it on a schedule or via a queue job, cache the resulting XML, and consider a sitemap index that points to smaller product and category sitemaps. This keeps generation predictable and reduces load on your Laravel application.
- What are alternatives to rapidez/sitemap for Laravel sitemaps?
- Spatie's laravel-sitemap is a common general-purpose option for Laravel applications. rapidez/sitemap is more specific to Rapidez storefronts and their product, category, and content URL patterns. A custom sitemap generator is another option if you need highly specialized URL rules or indexing logic.
- How do I add the sitemap to robots.txt and submit it to Google?
- Reference your sitemap URL in robots.txt, for example with a Sitemap line pointing to your generated XML. Then submit the sitemap in Google Search Console and verify that robots.txt does not block the sitemap or the URLs it contains. Keep the sitemap updated as products and categories change.
- Can I customize sitemap URLs for localized Rapidez storefronts?
- Rapidez storefronts can serve localized or multi-store URLs, so your sitemap strategy should generate output that matches each storefront's canonical URLs. Use the package configuration and your Rapidez routing setup to ensure localized product and category links are correct. Test each locale's sitemap separately before submitting them to search engines.
- Is rapidez/sitemap actively maintained and safe for production?
- Check the package's release history, Laravel version constraints, and open issues before adopting it in production. Pin a tested version in composer.json and run sitemap generation in staging against realistic catalog data. Because SEO output affects crawl behavior, validate the generated XML after upgrades to Rapidez or Laravel.