Htaccess Redirect Generator

Generate the Apache redirect line that moves an old address to a new one.

Runs in your browser — nothing is uploaded
    More options

    Your result will appear here.

    Free, no account, no sign-up. Nothing is uploaded. Everything runs on your device.

    Generate the Apache redirect line that moves an old address to a new one. You enter the old path, which must start with a slash, the new destination as a path or a full address, and whether the move is permanent (301) or temporary (302). The tool builds the Redirect directive with a comment above it stating the move in words, so the file stays readable for the next person who opens it. Paths containing spaces are rejected, because Apache would not read them correctly. A 301 tells search engines and browsers the move is permanent and the old address can be forgotten; a 302 says it is temporary. Save the result into the .htaccess file at the root of your site. Everything runs in your browser with no upload, no account and nothing stored.

    How to use Htaccess Redirect Generator

    1. Set the options adjust the settings below — length, range, colours or dates.
    2. Click Convert the tool runs entirely in your browser — nothing is uploaded.
    3. Read your result it appears below the tool.
    4. Download the result save it for your records.
    5. Convert another change the options and convert again — no sign-up, no limits.

    Format facts

    InputNo file needed — set the options below the box and convert.
    EngineBuilt-in browser engine
    CategoryDeveloper Tools

    Frequently asked questions

    What is the difference between 301 and 302?

    A 301 means the move is permanent: search engines move the ranking to the new address and browsers can remember it. A 302 means the move is temporary and the old address should be kept.

    Where do I put the generated line?

    Save it into the .htaccess file in the root of your site on an Apache server. Each redirect is one Redirect line in that file.

    Does the old path need to start with a slash?

    Yes. It is a path on your site, such as /old-page. A full address is not accepted for the old side, because Apache matches it against the path of the request.

    Can the new destination be a full address?

    Yes. It can be a path on your own site, such as /new-page, or a full address on another site. Both are valid destinations.