disallow GPT in robots.txt

This commit is contained in:
Niko Abeler 2023-08-09 19:16:17 +02:00
parent 5939bbd09d
commit 3f7b1bae50
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ func NewWebApp(
configRepo.Get(config.SITE_CONFIG, &siteConfig)
sitemapUrl, _ := url.JoinPath(siteConfig.FullUrl, "/sitemap.xml")
c.Set("Content-Type", "text/plain")
return c.SendString(fmt.Sprintf("User-agent: *\nAllow: /\n\nSitemap: %s\n", sitemapUrl))
return c.SendString(fmt.Sprintf("User-agent: GPTBot\nDisallow: /\n\nUser-agent: *\nAllow: /\n\nSitemap: %s\n", sitemapUrl))
})
// sitemap.xml
app.Get("/sitemap.xml", NewSiteMapHandler(entryService, configRepo).Handle)