# Custom Robots.txt and sitemap.xml Templates

**URL:** <https://discourse.gohugo.io/t/custom-robots-txt-and-sitemap-xml-templates/11869>\
**Category:** tips & tricks\
**Created:** [May 8, 2018, 1:53am UTC](https://discourse.gohugo.io/t/custom-robots-txt-and-sitemap-xml-templates/11869 "2018-05-08T01:53:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [May 8, 2018, 1:20pm UTC](https://discourse.gohugo.io/t/custom-robots-txt-and-sitemap-xml-templates/11869/4 "2018-05-08T13:20:37Z")

</div>

Good point. Looks like you’d need to do something like:

> [@Allow taxonomy with limitations](https://discourse.gohugo.io/t/allow-taxonomy-with-limitations/9609/10):
>
> No. But you can hide these pages so that search engines cannot index them. Replicate your taxonomies as a folder structure under /content/ and then in the\_index.md add the following parameter: +++ hidden = "true" +++ And then in the head partial of your site you could include {{ with .Params.hidden }}\<meta name="robots" content="noindex"\>{{ end }} Also change your sitemap.xml template under /layouts/ to: \<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"\> {{ range .Data.P…

---

_[View the full topic](https://discourse.gohugo.io/t/custom-robots-txt-and-sitemap-xml-templates/11869)._
