Redirect .html files to clean pages (without html)

Checking bugs for our webflow website in Ahrefs (see screenshot), I seem to have 14 urls (with extension html) in one directory (‘overig’) which have to be redirected to clean pages (without extension html). This warning is quite strange to me since in the webflow-files no .html references are found. But to fix this, I have to redirect 14 of those .html pages to clean pages. So:

to

and 13 other pages in this directory. What’s the proper redirect path for all of them in one rule?


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Welcome to the community @AngeloSpiler!

You can add 301 redirects for all of the necessary links by going to your Project Settings and clicking the Hosting tab along the top:

Thanks for helping but my question was: can I make use of wildcards (*) to redirect all of them at once? And if yes, how?

Yep, there’s some extra information here that covers the available wildcards along with some notes about escaping special characters as needed here.

You can always access the university page for reference by clicking the “Learn more about wildcard redirect rules” within the redirects section in your project settings :v:

Hello Mikey, naturally I already looked at that and the accompanying video. This (.*) wildcard handles all files in a folder, not the presence of an extension like .html. I guess I have to redirect all files separately. If there’s a smart guy out there who knows a solution, please let me know.

1 Like

Ah I see, my apologies. That specific type of wildcard isn’t available natively in Webflow, but thankfully in this case you’re only needing 14 entries so it should be minimal work.

Yes, thanks. By the way: it’s my opinion that Webflow should give a choice to go for .html extensions on their own servers. Now this only works when generating the code for uploading to other servers.

I agree, there should definitely be some consideration here for sites that were setup to use these initially (like in your case) however I think it’s the right move keeping them hidden. It’s pretty common place across the internet for nowadays and makes sense for a modern site building/hosting platform.

Ideally there would an option to automatically redirected URLs that included extensions to their non-extension counterparts, but given this is becoming less common (as fewer URLs use them) I don’t see this being on the development roadmap.