How to edit .htaccess through Yoast SEO?

Edit in WordPress dashboard

If the .htaccess file is not writable or your WordPress install has disabled file editing, the following steps may fail. Optionally, you can edit at the server level.

  1. Log in to your WordPress website.

    When you’re logged in, you will be in your ‘Dashboard’.

  2. Click on ‘SEO’.

    On the left-hand side, you will see a menu. In that menu, click on ‘SEO’.

  3. Click on ‘Tools’. 

    The ‘SEO’ settings will expand providing you with additional options. Click on ‘Tools’.

  4. Click on ‘File Editor’.

    This menu will not appear if your WordPress install has disabled file editing. Please enable file editing or edit the file through FTP.

  5. Make the changes to your file.

  6. Save your changes.

Create or edit on your server

  1. Use your favorite text editor and create a text file.
  2. Save the empty file with the name .htaccess.
  3. Upload the file to your server root.

Now you should be able to edit the newly created file from our plugin using the steps above. If not, you can always edit the .htaccess file directly on your server using FTP or a server file manager.

Please contact your web host for assistance if you have trouble uploading or editing files on your server.

Troubleshooting

If the issue you experience is not listed below, please see your support options.

Why do I see the error “.htaccess file is not writable”?

Your server permissions prevent writing to the file. Please contact your web host to change the permissions on the .htaccess file.

Why is the ‘File Editor’ menu missing?

Your WordPress install has disabled file editing. Please enable file editing or edit the file on the server.

Related articles

Get free SEO tips!