# Robots.txt template

**URL:** <https://zola.discourse.group/t/robots-txt-template/2174>\
**Category:** Support\
**Created:** [June 21, 2024, 7:20am UTC](https://zola.discourse.group/t/robots-txt-template/2174 "2024-06-21T07:20:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oyam](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/oyam/32/1167_2.png) [@oyam](https://zola.discourse.group/u/oyam)\
**Post date:** [June 21, 2024, 7:20am UTC](https://zola.discourse.group/t/robots-txt-template/2174/1 "2024-06-21T07:20:42Z")

</div>

I’m overriding the default robots.txt and wanted to include a set of files that are generated elsewhere. Since robots.txt is a template, I was hoping to just use Tera’s `{% include "robots.foo.txt" %}` as one would in any template, except I get an error:

```auto
Error: Failed to render 'robots.txt'
Error: Reason: Template '[robots.foo.txt]' not found

```

If I change the include and rename the file to `.html` instead of `.txt`, it seems to work. Is Tera not able to include non-html files? How does the `robots.txt` template work with `.txt` extension? Is this intended behaviour or a bug?

Thanks,  
Mayo

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [June 21, 2024, 8:06am UTC](https://zola.discourse.group/t/robots-txt-template/2174/2 "2024-06-21T08:06:53Z")

</div>

Tera can, but Zola only loads html files currently.

---

<div class="post-metadata">

**Author:** ![oyam](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/oyam/32/1167_2.png) [@oyam](https://zola.discourse.group/u/oyam)\
**Post date:** [June 22, 2024, 6:31am UTC](https://zola.discourse.group/t/robots-txt-template/2174/3 "2024-06-22T06:31:11Z")

</div>

I was trying to trace this through the code and wasn’t understanding, but now I notice `load_tera` specifically looks for \*.\*ml and \*.md, and robots.txt if it exists.

Is there any reason only these files are loaded as templates? Would a PR be welcome to expand this list or add configuration option with list of additional file patterns/extensions?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [June 23, 2024, 6:11pm UTC](https://zola.discourse.group/t/robots-txt-template/2174/4 "2024-06-23T18:11:40Z")

</div>

I think adding txt to that list is fine
