Merge pull request #5231 from sbwalker/dev

improve sitemap detection in robots.txt
This commit is contained in:
Shaun Walker
2025-04-09 11:26:53 -04:00
committed by GitHub

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";