# Redirect Rule Generator

Paste the old address and the new one, a pair per line, and get the same set of redirects written three ways: as a Netlify-style _redirects file, as Apache .htaccess rules, and as Nginx location directives. Everything is generated in your browser, and the status code for each rule is yours to choose.

This tool runs entirely in the browser. Nothing is uploaded, and no account is needed.

## How to use it

1. **Paste your pairs.** One redirect per line: the old path, a space, the new path, and optionally a status code.
2. **Pick the default status.** Choose 301 for a permanent move or 302 for a temporary one. Any line that names its own code keeps it.
3. **Copy the format you need.** Switch between _redirects, .htaccess and Nginx output and copy or download the one your host reads.

## Frequently asked questions

### Is the redirect generator free?

Yes, free with no sign-up. The rules are generated in your browser and nothing you paste is sent anywhere.

### Should I use 301 or 302?

Use 301 when the move is permanent, because it transfers ranking signals. Use 302 when you intend to put the original back. A 301 is cached hard by browsers, so it is difficult to undo.

### What format should each line be in?

One pair per line: the old path, a space, the new path, and optionally the status code. Both paths can be root-relative, and the destination can be an absolute URL on another host.

### Does the order of the rules matter?

Yes. All three formats match in order, so a general pattern placed above a specific one will swallow it. Put your most specific rules first.

### Can I redirect from a host I no longer own?

No. A redirect is served by whatever answers the old address, so it has to be configured on that host. If you have already left it, those URLs cannot be rescued from here.

### How do I check a rule actually works?

Request the old URL and read the status and the location header it returns, rather than clicking a link. A rule that lands somewhere via three hops looks identical in a browser to one that lands in a single hop.