# Robots.txt and sitemaps

**URL:** <https://discourse.gohugo.io/t/robots-txt-and-sitemaps/11468>\
**Category:** Uncategorized\
**Created:** [April 10, 2018, 7:09am UTC](https://discourse.gohugo.io/t/robots-txt-and-sitemaps/11468 "2018-04-10T07:09:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joerg](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@Joerg](https://discourse.gohugo.io/u/Joerg)\
**Post date:** [April 10, 2018, 7:09am UTC](https://discourse.gohugo.io/t/robots-txt-and-sitemaps/11468/1 "2018-04-10T07:09:49Z")

</div>

I’ve used the google webmaster tools to analyze my page. It came to several errors. My website is multilingual. No robots.txt could be found.  
In the Documentaion I found the hint that the entry enableRobotsTXT = true should be set. The robots.txt is not created. I created the robots.txt in the static folder.

```
User-agent: *

{{range .Data.Pages}}
Disallow: {{.RelPermalink}}
{{end}}

```

The sitemaps were created in the directories /de and /en. Google can not find this. The sitemaps should be located in the root directory.

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [April 10, 2018, 8:39am UTC](https://discourse.gohugo.io/t/robots-txt-and-sitemaps/11468/2 "2018-04-10T08:39:49Z")

</div>

I always hand code mine so I have not used this feature but, if you put it in `static`, according to the docs it appears you just have to make a normal one. If you want to use template codes it has to go under `layout`.

See this again? 🙂

> **[Robots.txt File](https://gohugo.io/templates/robots/#readout)**
>
> Hugo can generate a customized robots.txt in the same way as any other template.
