# Can you remove the section from the URL and use just filename?

**URL:** <https://discourse.gohugo.io/t/can-you-remove-the-section-from-the-url-and-use-just-filename/521>\
**Category:** support\
**Created:** [December 29, 2014, 10:26am UTC](https://discourse.gohugo.io/t/can-you-remove-the-section-from-the-url-and-use-just-filename/521 "2014-12-29T10:26:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLoneCuber](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/thelonecuber/32/71_2.png) [@TheLoneCuber](https://discourse.gohugo.io/u/TheLoneCuber)\
**Post date:** [December 29, 2014, 10:26am UTC](https://discourse.gohugo.io/t/can-you-remove-the-section-from-the-url-and-use-just-filename/521/1 "2014-12-29T10:26:55Z")

</div>

I know you can override URLs with front-matter, and that works exactly how it should. But to save manually adding the URL line to every .md file, can you somehow set the section name (via config) to generate with just the filename?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [December 29, 2014, 12:16pm UTC](https://discourse.gohugo.io/t/can-you-remove-the-section-from-the-url-and-use-just-filename/521/2 "2014-12-29T12:16:20Z")

</div>

This should work:

```
[permalinks]
    post = "/:filename"

```

See:

> **[URL Management](http://gohugo.io/content-management/urls/)**
>
> Hugo supports permalinks, aliases, link canonicalization, and multiple options for handling relative vs absolute URLs.

---

<div class="post-metadata">

**Author:** ![TheLoneCuber](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/thelonecuber/32/71_2.png) [@TheLoneCuber](https://discourse.gohugo.io/u/TheLoneCuber)\
**Post date:** [December 29, 2014, 9:21pm UTC](https://discourse.gohugo.io/t/can-you-remove-the-section-from-the-url-and-use-just-filename/521/3 "2014-12-29T21:21:26Z")

</div>

I had tried this and it didn’t seem to work. But I just needed to manually delete the publishdir folder and rebuild. Thank you.

---

<div class="post-metadata">

**Author:** ![arikroc](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arikroc/32/6348_2.png) [@arikroc](https://discourse.gohugo.io/u/arikroc)\
**Post date:** [July 7, 2018, 5:04am UTC](https://discourse.gohugo.io/t/can-you-remove-the-section-from-the-url-and-use-just-filename/521/4 "2018-07-07T05:04:43Z")

</div>

@bep an interesting thing that happens here is if you have a content piece named index.md, then you end up with two root/ entries in your sitemap. The manual fix is to rename index.md to something else.
