# Don’t name a folder “sitemap”

**URL:** <https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580>\
**Category:** support\
**Tags:** v0-123-x\
**Created:** [February 29, 2024, 8:31pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580 "2024-02-29T20:31:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwintx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bwintx/32/10450_2.png) [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Post date:** [February 29, 2024, 8:31pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/1 "2024-02-29T20:31:40Z")

</div>

I discovered to my surprise today that my Hugo site had no `sitemap.xml` file. I’ve long had folders named `content/sitemap/` and `layouts/sitemap/` for the purpose of generating an HTML sitemap, but never saw a problem with that until now regarding the standard, default **XML** sitemap that Hugo normally creates automatically. Lo and behold, once I renamed those two folders (to `content/sitemaphtml/` and `layouts/sitemaphtml/`, respectively), Hugo once again happily generated `sitemap.xml` in the `/public` folder. Perhaps it became confused, somehow. No idea. Anyway, am just passing this along in case it may be helpful.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 29, 2024, 10:28pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/2 "2024-02-29T22:28:32Z")

</div>

> [@bwintx](#):
>
> `content/sitemap/` and `layouts/sitemap/` for the purpose of generating an HTML sitemap

Out of curiosity, to what path was this published? Also note that this setup worked fine with v0.122.0, so this is a bug.

Is the setup something like this?

```plaintext
content/
└── sitemap/
    └── index.md <-- front matter: type = sitemap

```

```plaintext
layouts/
└── sitemap/
    └── single.html

```

---

<div class="post-metadata">

**Author:** ![bwintx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bwintx/32/10450_2.png) [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Post date:** [February 29, 2024, 11:01pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/3 "2024-02-29T23:01:56Z")

</div>

@jmooring Yes, exactly that setup.

I was unable to determine when the issue began, other than checking Google Search Console and noting that it had failed to detect `/sitemap.xml` in either January or February (until I manually supplied it today, that is); I couldn’t get to reports from 2023, so unfortunately I can’t tell you in which Hugo version it began.

I did search the Hugo GH issues and the Discourse for similar reports about issues with `sitemap.xml`, especially recently, but found nothing of that nature — although my usage may have been sufficiently non-standard that it wouldn’t have generated any issue reports in the first place.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 29, 2024, 11:02pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/4 "2024-02-29T23:02:40Z")

</div>

It worked in v0.122.0. This is a bug.

---

<div class="post-metadata">

**Author:** ![bwintx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bwintx/32/10450_2.png) [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Post date:** [February 29, 2024, 11:03pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/5 "2024-02-29T23:03:38Z")

</div>

Shall I file the issue, or are you already doing so?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 29, 2024, 11:04pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/6 "2024-02-29T23:04:48Z")

</div>

I’ll take care of it; I can provide an integration test at the same time. Please leave this topic unsolved.

---

<div class="post-metadata">

**Author:** ![bwintx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bwintx/32/10450_2.png) [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Post date:** [February 29, 2024, 11:05pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/7 "2024-02-29T23:05:08Z")

</div>

Will do. Thanks as usual, sir.

---

<div class="post-metadata">

**Author:** ![bwintx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bwintx/32/10450_2.png) [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Post date:** [February 29, 2024, 11:13pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/8 "2024-02-29T23:13:03Z")

</div>

Incidentally, this link will show you my setup prior to my discovering the `sitemap.xml` glitch:

> **[GitHub - brycewray/hugo-site at 9ed2fad8104c66c677711d9fa30e1e87ca7513f3](https://github.com/brycewray/hugo-site/tree/9ed2fad8104c66c677711d9fa30e1e87ca7513f3)**
>
> 9ed2fad8104c66c677711d9fa30e1e87ca7513f3

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 29, 2024, 11:52pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/9 "2024-02-29T23:52:56Z")

</div>

[https://github.com/gohugoio/hugo/issues/12183](https://github.com/gohugoio/hugo/issues/12183)

---

<div class="post-metadata">

**Author:** ![bwintx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bwintx/32/10450_2.png) [@bwintx](https://discourse.gohugo.io/u/bwintx)\
**Post date:** [March 1, 2024, 4:52pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/10 "2024-03-01T16:52:19Z")

</div>

Fixed in 0.123.7. Thanks, @bep and @jmooring !

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 3, 2024, 4:52pm UTC](https://discourse.gohugo.io/t/don-t-name-a-folder-sitemap/48580/11 "2024-03-03T16:52:50Z")

</div>

Closed on March 3, 2024, 4:52pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
