InstrumentsRedirect Rules Generator
Redirect Rules Generator
Turn old-to-new paths into redirect rules for Vercel, Next.js, Apache or nginx, with checks for loops, duplicates and unsafe characters.
Redirect Rules Generator
One rule per line, in the form from to status. Example: /old-page /new-page 301. The status is optional and defaults to 301. Allowed statuses: 301, 302, 307, 308. A from path starts with / and a to value starts with / or is an http:// or https:// URL. Up to 200 rules.
Choose the file your host reads.
This format only has a permanent flag. The status code the browser receives is set by the host, not by this file.
Copy the output into the config file your host reads. The status code a browser receives is set by the host. This tool does not check whether the destination exists, so test each redirect after you deploy.
{
"redirects": [
{
"source": "/old-pricing",
"destination": "/pricing",
"permanent": true
}
]
}FAQ
Which status code should I use for a moved page?
301 and 308 mark a move as permanent. 302 and 307 mark it as temporary. Use a temporary code only when the old path will come back.
Why does the Vercel output only have a permanent flag?
The Vercel redirects array takes a permanent true or false value, so the tool writes true for 301 and 308 and false for 302 and 307. The status code the browser receives is set by the host.
Does the tool check that the destination exists?
No. It checks the format of each line and looks for duplicates and loops between rules. It does not request the destination, so test each redirect after you deploy.
Related tutorials
§04Toolbox
Related tools
Personalize your path
Choose your experience level once.
Next Step
Build fundamentals after each tool run so you can apply concepts with confidence.