Where can I find the .htaccess file in Webflow to add custom code?

Published on
September 22, 2023

To add custom code to your Webflow site, including .htaccess files, follow these steps:

  1. Log into your Webflow account: Go to the Webflow website (https://webflow.com/) and sign in using your credentials.

  2. Access your project: Once you're logged in, navigate to the project for which you want to add custom code. Select the project from the Dashboard or choose it from the dropdown menu located on the top left corner of the screen.

  3. Open the Project Settings: From your project's Dashboard, click on the "Project Settings" button located in the left sidebar.

  4. Navigate to the "Hosting" tab: In the Project Settings, you'll find a series of tabs at the top of the page. Select the "Hosting" tab.

  5. Scroll down to the "Custom Code" section: As you scroll down the Hosting tab, you'll come across the "Custom Code" section.

  6. Click on the "Add file" button: Within the "Custom Code" section, click on the "Add file" button.

  7. Upload and configure your .htaccess file: A file upload dialog box will appear. Choose your .htaccess file from your computer's file system and upload it. Once uploaded, you can add, modify, or remove any custom code within the file.

  8. Save and publish: After you've made the necessary changes to your .htaccess file, click the "Save & Publish" button located at the bottom of the page to ensure your changes take effect.

It's important to note that Webflow currently only supports uploading of .htaccess files for password protection of your site using Basic Auth. If you're looking to add other types of custom code, such as mod_rewrite rules, you may need to consider using a different hosting provider that allows full access to the .htaccess file.

Additional Questions:

  1. How do I password protect my Webflow site using an .htaccess file?
  2. Is it possible to add custom CSS to my Webflow site?
  3. Can I use custom JavaScript in Webflow?