Redirect generator
Enter the old path and the new URL. Add another row for another path. Copy the Apache block or the Nginx block.
- 301 or 302
- Free, no sign-up
Free to use, no account. More seo tools
How to use it
- Choose 301 or 302.
- Enter the old path and the destination URL.
- Add a row if you have more than one, then copy the rules.
What is matched
The from field is turned into a path. If you paste a full URL, the host is removed and the path is what the rule matches. The rule is an exact path match, not a pattern. Apache is a RewriteRule with R and L. Nginx is a location with return.
Test the rules on a staging host. A wrong rule can hide the site. This page does not install the rule on a server.
Private by design
Privacy
The paths stay in this tab and are not uploaded.
Questions
When do I use 302?
When the move is temporary. Use 301 when the old path has moved for good.
Does this keep query strings?
The Apache rule as written matches the path. A query string is not copied unless your server config already does that.
Can one row redirect a whole folder?
No. Each row is one exact path. A folder pattern belongs in the server config you review by hand.