WordPress .htaccess Generator
The .htaccess file controls how Apache serves your WordPress site. It handles pretty permalinks and can add redirects, security rules, and caching. This generator builds a clean file from the options you choose, in the correct order.
Tick the rules you want, then copy the file. Back up your existing .htaccess before replacing it.
How to use it
- Enter your domain if you plan to use the www or hotlink rules.
- Tick the rules you want. The standard WordPress rewrite rules are on by default.
- Copy the result and paste it into the .htaccess file in your site root folder.
Always keep a copy of your existing .htaccess before you replace it. If your site runs on Nginx rather than Apache, these rules do not apply.
Frequently asked questions
Where is the .htaccess file?
In the root folder of your WordPress install, alongside the wp-admin and wp-content folders. It may be hidden, so enable showing hidden files in your editor.
Do these rules work on Nginx?
No. The .htaccess file is an Apache feature. Nginx users need equivalent rules in the server configuration.
