# How to remove .html from website url?

**URL:** <https://forum.infinityfree.com/t/how-to-remove-html-from-website-url/58709>\
**Category:** Hosting Support\
**Created:** [March 3, 2022, 5:18pm UTC](https://forum.infinityfree.com/t/how-to-remove-html-from-website-url/58709 "2022-03-03T17:18:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon25985046](https://forum.infinityfree.com/letter_avatar/anon25985046/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon25985046](https://forum.infinityfree.com/u/anon25985046)\
**Post date:** [March 3, 2022, 5:18pm UTC](https://forum.infinityfree.com/t/how-to-remove-html-from-website-url/58709/1 "2022-03-03T17:18:16Z")

</div>

How to remove the .html from the website url for example website.domain/file.html to website.domain/file?

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [March 3, 2022, 5:28pm UTC](https://forum.infinityfree.com/t/how-to-remove-html-from-website-url/58709/2 "2022-03-03T17:28:26Z")

</div>

You need to add these to .htaccess

```auto
Options +MultiViews
RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

```

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [March 10, 2022, 5:29pm UTC](https://forum.infinityfree.com/t/how-to-remove-html-from-website-url/58709/3 "2022-03-10T17:29:13Z")

</div>

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