# Pretty URL in Asset optimization not working

**URL:** <https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674>\
**Category:** Support\
**Tags:** deployment\
**Created:** [July 29, 2021, 1:55pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674 "2021-07-29T13:55:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dk-raw](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dk-raw/32/27977_2.png) [@dk-raw](https://answers.netlify.com/u/dk-raw)\
**Post date:** [July 29, 2021, 1:55pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674/1 "2021-07-29T13:55:51Z")

</div>

I recently enabled asset optimization through netlify in my website but the Pretty URL function does not work as it still displays the .html extensions in every page. Is there something that I am doing wrong?

Thanks in advance,  
Damian

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [July 29, 2021, 1:59pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674/2 "2021-07-29T13:59:31Z")

</div>

Hi @dk-raw,

Pretty URL removes the .html extension from links in your HTML pages. Meaning `<a href = "/foo.html">...</a>` would become `<a href = "/foo">...</a>`. It doesn’t change what’s displayed in the address bar.

---

<div class="post-metadata">

**Author:** ![dk-raw](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dk-raw/32/27977_2.png) [@dk-raw](https://answers.netlify.com/u/dk-raw)\
**Post date:** [July 29, 2021, 2:01pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674/3 "2021-07-29T14:01:10Z")

</div>

Is there a way to do that through Netlify though?

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [July 29, 2021, 2:02pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674/4 "2021-07-29T14:02:14Z")

</div>

Not really unfortunately. You can read this detailed guide here:

> [@\[Support Guide\] How can I alter trailing slash behaviour in my URLs? Will enabling Pretty URLs help?](https://answers.netlify.com/t/support-guide-how-can-i-alter-trailing-slash-behaviour-in-my-urls-will-enabling-pretty-urls-help/31191/):
>
> Last reviewed by Netlify Support: July 2025 First Steps Depending on how you configure your site, you may be served either [www.example.com/about](http://www.example.com/about) or [www.example.com/about/](http://www.example.com/about/) – so, what’s easiest? What’s best? What’s the way to make this behaviour match what you want it to do? [One source notes](https://edit.co.uk/blog/urls-trailing-slash-seo/): Theoretically a URL with a trailing slash implies a directory and a URL without a trailing slash is a file, but this isn’t really important anymore. Although it may not be important, it’s a good rule of…

---

<div class="post-metadata">

**Author:** ![dk-raw](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dk-raw/32/27977_2.png) [@dk-raw](https://answers.netlify.com/u/dk-raw)\
**Post date:** [July 29, 2021, 2:04pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674/5 "2021-07-29T14:04:15Z")

</div>

Thanks,  
I also wanted to know what is the point of Pretty URLs if the only difference is in the source code?

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [July 29, 2021, 2:07pm UTC](https://answers.netlify.com/t/pretty-url-in-asset-optimization-not-working/41674/6 "2021-07-29T14:07:33Z")

</div>

Most users might navigate in your website’s pages through the links on the website. So, it’s useful to make it consistent and force all links in the HTML to point to the same-styled destination.

But, Netlify will still serve the page when it’s requested directly with the .html extension. If that’s not done, it would return in 404s as each client might request the page differently. One might request with `/`, other might request without it and some might request with .html. Each of those clients needs to see the page instead of a 404 error.
