Skip to content

Commit

Permalink
Make robots.txt compliant with RFC (#1895)
Browse files Browse the repository at this point in the history
The [RFC](http://www.robotstxt.org/orig.html) mentions only `Disallow`
directive, so it must appear in the file.

`Allow` is an ad hoc agreement between search engines that no all of
them follow.
  • Loading branch information
bemyak authored Jun 12, 2022
1 parent c70aaf7 commit d4b5c4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/templates/src/builtins/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
User-agent: *
Disallow:
Allow: /
Sitemap: {{ get_url(path="sitemap.xml") }}
1 change: 1 addition & 0 deletions docs/content/documentation/templates/robots.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and the default is what most sites want:

```jinja2
User-agent: *
Disallow:
Allow: /
Sitemap: {{/* get_url(path="sitemap.xml") */}}
```
1 change: 1 addition & 0 deletions test_site/templates/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
User-agent: zola
Disallow:
Allow: /
Sitemap: {{config.base_url}}/sitemap.xml

0 comments on commit d4b5c4f

Please sign in to comment.