How can I remove the ".html" extension from the URLs of exported sites in Webflow?

Published on
September 22, 2023

To remove the ".html" extension from the URLs of exported sites in Webflow, you can follow these steps:

  1. Export your Webflow site: To begin with, export your Webflow site by going to the project dashboard, selecting the site you want to export, and clicking on the "Export" button.

  2. Edit your exported site files: Once the export completes, you'll have a folder containing all the files of your Webflow site. Open the folder and navigate to the "pages" or "pages-advanced" directory. This is where your HTML files are located.

  3. Rename your HTML files: In the "pages" or "pages-advanced" directory, you'll notice that each HTML file represents a page on your site and has a ".html" extension. To remove this extension, you need to rename each file accordingly. For example, if you have a page named "contact.html", rename it to just "contact".

  4. Update internal links: After renaming the HTML files, you need to update the internal links within your site. Open each HTML file with a text editor and search for links that include the ".html" extension. For instance, if you have a link pointing to "about.html", change it to "about".

  5. Reconfigure server settings: If you're hosting your site on a server, you need to configure the server settings to handle these new URLs without the ".html" extension. This step may vary depending on the hosting platform you're using. For example, if you're using Apache, you can achieve this by creating an ".htaccess" file and adding rewrite rules.

  6. Test your site: With the file renaming and internal link updates done, you can now test your site to ensure that the URLs are working correctly without the ".html" extension. Check the functionality of all internal links and make sure that all pages are accessible.

By following these steps, you can remove the ".html" extension from the URLs of your exported Webflow site, creating cleaner and more user-friendly URLs for your visitors.

Additional questions:

  1. How can I export my Webflow site?
  2. What is an ".htaccess" file and how do I create one?
  3. How do I configure server settings for a Webflow site without the ".html" extension?