Sitemap blank on production only #505
Replies: 5 comments 2 replies
-
Hi @tweakitguy, did you get anywhere with this? I'm having the same problem |
Beta Was this translation helpful? Give feedback.
-
Same here. |
Beta Was this translation helpful? Give feedback.
-
It's help me to fix my same problem use Spatie\Sitemap\SitemapGenerator;
$file = public_path("sitemap.xml");
$url = config("app.url");
SitemapGenerator::create($url)->configureCrawler(function ($crawler) {
$crawler->ignoreRobots();
})->writeToFile($file); |
Beta Was this translation helpful? Give feedback.
-
In my opinion, it is necessary to check the site (https, it does not matter) for the presence of the meta tag |
Beta Was this translation helpful? Give feedback.
-
If the link cannot be closed with
|
Beta Was this translation helpful? Give feedback.
-
Using standard config as per instructions. Generating fine on local machine using
php artisan sitemap:generate
However the same command executive on my production server (NGINX, PHP 8.1) produces an empty sitemap. Only difference I can tell is .env pointing to https. I have added
RequestOptions::VERIFY => false
as some have pointed out.Beta Was this translation helpful? Give feedback.
All reactions