From ed14f760a763c2d05d6b57107270de346e56b5bb Mon Sep 17 00:00:00 2001 From: zft9xgy Date: Sat, 27 Jul 2024 00:22:30 +0200 Subject: [PATCH] Fix: sitemap url and add control on crawl base on seo index settings --- templates/txts/robots.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/txts/robots.txt b/templates/txts/robots.txt index 8959b4f..821b29d 100644 --- a/templates/txts/robots.txt +++ b/templates/txts/robots.txt @@ -1,5 +1,13 @@ +{% if index %} +User-agent: * +Allow: / +{% else %} User-agent: * Disallow: / +{% endif %} Disallow: /admin/ Disallow: /static/ -Sitemap: {{ domain_url }}/sitemap.txt + +{% if index %} +Sitemap: https://{{ domain_url }}/sitemap.xml +{% endif %}