.htaccess Redirect Generator

.htaccess Redirect Generator

Build Apache redirect rules for pages, folders, domain moves and HTTPS, and test them.

Ready
Try:

Status code

Fill in the form to start

From —
To —
Rules
—
Lines
—
Hops
—
  1. Request
    Waiting for input
    What the visitor asks for
  2. Rule
    —
    First rule that matches
  3. Response
    —
    Status and Location header
  4. Lands on
    —
    Final address

Your redirect rules

Test a URL

Choose what you are moving and enter the addresses above. Each rule appears here with a plain-English explanation, ready to copy.

The .htaccess code0 lines
Paste at the top of .htaccess, above # BEGIN WordPress. Keep a backup of the old file.
# Your rules will appear here.
Test a URL against these rules

    Simulated in your browser with the same logic as the generated rules. Other rules on your server, plugins and caches can change the real result.