improve sitemap detection in robots.txt

This commit is contained in:
sbwalker
2025-04-09 11:26:33 -04:00
parent 231f9bca84
commit b1656d1eea

View File

@ -84,7 +84,7 @@ namespace Oqtane.Infrastructure
// allow all user agents by default
robots = $"User-agent: *";
}
if (!robots.ToLower().Contains("sitemap"))
if (!robots.ToLower().Contains("Sitemap:"))
{
// add sitemap if not specified
robots += $"\n\nSitemap: {context.Request.Scheme}://{alias.Name}/sitemap.xml";