Pick the .htaccess Rules You Need

Open a group, tick what applies, and watch the file build itself. Start from a preset if you want a sensible baseline to edit.

Start from a preset

Output uses Apache 2.4 syntax. The access control blocks include the Apache 2.2 equivalent as a comment.

Redirects
Single redirects One old path to one new path. The target can be a path or a full URL.
Security headers

CSP breaks pages when a directive is too tight. Test every template before enforcing.

Access control

Keep this file outside the web root so nobody can download it.

Performance
Other

Most modern hosts run PHP-FPM. If yours does, set these in php.ini or a .user.ini file instead.

How the Generated File Is Put Together

Order matters in an .htaccess file, and getting it wrong produces bugs that look random. Rewrite rules run before caching and header directives. Inside the rewrite block, a whole domain move comes first, then the https redirect, then the canonical hostname, then your individual redirects, and a front controller such as the WordPress block goes last because it swallows everything left over.

The generator sorts all of that for you, so you can tick options in any order and still get a file that behaves. Each block is wrapped in the IfModule guard for the module it needs, which means a server without mod_expires quietly skips the caching block instead of returning a 500 on every request.

Before you upload

Back up whatever is in your web root now. Download a copy rather than renaming the file in place, because .htaccess.bak sitting next to it is still readable over http. Then upload, load the site in a private window, and check the redirect chain rather than the final page: one hop is right, two or more means your rules are arguing with each other.

The setup guide walks through that process properly, including how to tell whether Apache is reading your file at all. Quick questions such as 301 against 302, or www against non-www, are answered on the FAQ page.