# Template menu generation .URL messed up using relativeURLs: true

**URL:** <https://discourse.gohugo.io/t/template-menu-generation-url-messed-up-using-relativeurls-true/3527>\
**Category:** support\
**Created:** [June 16, 2016, 8:35pm UTC](https://discourse.gohugo.io/t/template-menu-generation-url-messed-up-using-relativeurls-true/3527 "2016-06-16T20:35:01Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Rob\_Arnold](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rob_arnold/32/1923_2.png) [@Rob\_Arnold](https://discourse.gohugo.io/u/Rob_Arnold)\
**Post date:** [February 13, 2017, 9:32pm UTC](https://discourse.gohugo.io/t/template-menu-generation-url-messed-up-using-relativeurls-true/3527/9 "2017-02-13T21:32:35Z")

</div>

Note linked topic. If `relativeURLs=true` then setting `canonifyURLs=true` will make the URL manipulation done by the menu code not include context root, and therefore not get the path doubled as I posted above. In this case, the `canonifyURLs=true` will _not_ make all the relative urls canonicalized into absolute urls as one might expect given the docs.

> **[CanonifyURLs & RelativeURLs interaction](https://discourse.gohugo.io/t/canonifyurls-relativeurls-interaction/5448)**
>
> PSA: CanonifyURLs and RelativeURLs interact with each other, and in particular if you use RelativeURLs=true, you may want to use CanonifyURLs=true also. If both are true, CanonifyURLs will not actually canonify all your relative urls… It will...

---

_[View the full topic](https://discourse.gohugo.io/t/template-menu-generation-url-messed-up-using-relativeurls-true/3527)._
