Streaming live at 10am (PST)

Remove .html on exported site


How do I remove .html in the URL on exported sites?


Take a look at this! :slight_smile:

Yes I have tried that but dont get it to work.

I created a GitHub Action to fix this undesirable, broken behavior of Webflow’s export:

Fixes all the paths in all the files and then commits them

1 Like

Awesome - this exact item was on my action list to sort next week!

Thanks for sharing this, I’ll definitely be going through this properly soon.

1 Like

So I got round to looking at this today, and ran it on a site I had at the time. It’s certainly really helpful so thanks again for sharing.

It’s not something I have any experience in, so I may have to look a little closer at this but I’m interested in knowing whether this can also 1) restructure the files into the relevant directory names, 2) change the files to index and 3) whether the original index.html can be handled in such a way that it’s left alone and the links point to root?

Or have I missed a trick here?


@iratefox not sure I’m understanding what you mean… do you mean that you want to create directories matching the filenames and add the files to them?


about-us.html → about-us/index.html

This is not a part of the script - my free host Netlify (highly recommended) will serve the about-us.html file as /about-us/

But if your host does not do this and you cannot switch to one that does, then you can modify the script on / after these lines here (these lines do a find and replace in all files to fix the paths). Each line that you write after these lines will be run as a “bash script”. So in case you don’t know what that is, you can google for how to do the thing you want in bash :slight_smile:

1 Like

Thank you - I was working on this just now and concluded that there’s more to it at host side. I am now using this in combo with a .htaccess file which is a good combo and handles everything as expected.

Great, glad to hear it! Mind posting the relevant parts of the .htaccess file that you’re using?