# Adding category name to post url

**URL:** <https://discourse.gohugo.io/t/adding-category-name-to-post-url/24815>\
**Category:** support\
**Created:** [April 17, 2020, 10:44pm UTC](https://discourse.gohugo.io/t/adding-category-name-to-post-url/24815 "2020-04-17T22:44:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamHamou](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/samhamou/32/11003_2.png) [@SamHamou](https://discourse.gohugo.io/u/SamHamou)\
**Post date:** [April 17, 2020, 10:44pm UTC](https://discourse.gohugo.io/t/adding-category-name-to-post-url/24815/1 "2020-04-17T22:44:25Z")

</div>

hey is there anyway i can add the category to the posts url  
example ; `example.com/tech/google-new-phone`

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [April 17, 2020, 11:21pm UTC](https://discourse.gohugo.io/t/adding-category-name-to-post-url/24815/2 "2020-04-17T23:21:44Z")

</div>

The available fragments are listed at [https://gohugo.io/content-management/urls/#permalink-configuration-values](https://gohugo.io/content-management/urls/#permalink-configuration-values).

Since you want a single “category”, it _could_ be your content is structured into _sections_ (rather than a taxonomy). So you’d have `/content/tech/google-new-phone.md` and use `:section`.

---

<div class="post-metadata">

**Author:** ![SamHamou](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/samhamou/32/11003_2.png) [@SamHamou](https://discourse.gohugo.io/u/SamHamou)\
**Post date:** [April 17, 2020, 11:43pm UTC](https://discourse.gohugo.io/t/adding-category-name-to-post-url/24815/3 "2020-04-17T23:43:56Z")

</div>

hi thanks for the reply 😄 i am a newbie here so still don’t know how to work with hugo  
my website have multiple categories if i add this posts: section/slug to my config will it work  
automatically

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [April 18, 2020, 1:28am UTC](https://discourse.gohugo.io/t/adding-category-name-to-post-url/24815/4 "2020-04-18T01:28:44Z")

</div>

> [@SamHamou](#):
>
> my website have multiple categories if i add this posts: section/slug to my config will it work

No, you’ll need to understand the difference between a taxonomy (category) and a section in Hugo.

There is no config to do what you want. I was suggesting you change the structure of your files. I take that suggestion back; what you want it not currently possible without changing a lot of your content.
