htaccess Redirect Generator

Developer Tools

Create 301/302 redirect rules for Apache

FreePrivateInstant
Add a file · .txt .md .csv .json … · up to 2.00 MB
Redirect type

Similar tools you may like

History

All history →

htaccess Redirect Generator — at a glance

Send visitors and Google from an old URL to a new one without losing your rankings.

Input
/old-page /new-page
Run
Result
Redirect 301 /old-page /new-page

How to use it — step by step

One redirect per line: the old path, a space, then the new path or full URL.

1

Paste your input

Paste or type your content into the big input box.

2

Choose options

Pick the mode and options that fit what you need.

3

Generate Rules

Press the button. The result is created instantly on your device.

4

Copy the result

Check the output and press Copy to use it anywhere.

Pro tips

Small things that make the result better.

✦Use 301 when a page has moved for good.
✦Add the rules to the .htaccess file in your site’s root folder.
✦Back up your .htaccess before editing it.

Quick facts

301 / 302both supported
HTTPSone-click option
Apacheworks on most hosts
Freeno signup

Frequently Asked Questions

Does this work on Netlify or Vercel?+

No. .htaccess is for Apache servers. Netlify and Vercel use their own redirect settings.

301 or 302?+

301 tells search engines the move is permanent. Use 302 only for temporary changes.

Is my data safe?+

Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.

More Free Tools