Webpages using .html or .htm result in 404 Page not found

Recently migrated website www.stateroofing.com to Webflow hosting using the custom domain. The site looks great on all devices, but I am finding the pages result in a ‘404 - Page not found’ if .html or .htm is added to a page name.

Examples:
www.stateroofing.com/about works fine but www.stateroofing.com/about.html or www.stateroofing.com/about.htm both result in '404 - Page not found.

stateroofing.com/about works fine but stateroofing.com/about.html or stateroofing.com/about.htm both result in '404 - Page not found.

All webpages work the same and have the same issue.

I don’t believe Webflow ever uses the .html/.htm extension and if your previous site didn’t use them, there’s no issue or difference SEO wise.

If your previous site used the .html/.htm extensions, you’ll want to 301 redirect whichever extension was used to the new pages. You should be able to use the wildcard feature as to not have to setup a redirect for every single page.

Something along these lines (note: I have not tested this myself:

/(.*).html
/(.*)/(.*).html
etc for as ‘deep’ as your site went.

I was also thinking a 301 redirect wildcard might solve the issues but using from: /(.).html to: /(.). had no effect. Does anyone know of an .html redirect wildcard which will work?

Hi @jetski777 and @​kragit excellent questions!

You can actually setup a wildcard redirect for those extensions.

Here’s what that would look like exactly:

/(.*).html would point to /%1

/(.*).htm would also point to /%1

Please let me know if this is helpful or if you have any other questions :smiley:

1 Like

Thank you very much, this solved the .html and .htm issues with the webpage. You may want to revise the help document at 301 redirects | Webflow University as it does not explain the usage of /%1 that is used in the help article.

1 Like

This topic was automatically closed after 60 days. New replies are no longer allowed.