Paste a list of old and new URLs, one pair per line (straight from a spreadsheet works), choose the redirect type and your server, and the generator writes the rules: RewriteRule lines for Apache .htaccess, location blocks for Nginx, a _redirects file for Netlify and Cloudflare Pages, or a web.config for IIS. Old URLs with query strings such as /product.php?id=7 are handled too.
Site-wide rules are one click away: force HTTPS, choose www or no www, or move the whole site to a new domain while keeping every path. The checks warn about duplicates, redirects to themselves, chains and temporary redirects where a permanent one is better for SEO.
How to use the Redirect Generator (.htaccess & Nginx) tool
- Paste old and new URLs, one pair per line.
- Choose 301 (or another type) and your web server.
- Optionally enter your domain and tick Force HTTPS, the www rule or a domain move.
- Copy or download the rules, add them to your server configuration and test with the redirect checker.
Why use ToolOrca Redirect Generator (.htaccess & Nginx)
- Apache .htaccess, Nginx, Netlify / Cloudflare Pages and IIS web.config
- 301, 308, 302 and 307 redirects
- Query-string redirects (old dynamic URLs)
- Force HTTPS, www / non-www and whole-domain moves
- Accepts full URLs, paths and CSV
- Warnings for duplicates, loops, chains and temporary redirects
301 or 302?
Use 301 (or 308) when a page has moved for good: browsers cache it and search engines transfer the old URL's ranking signals to the new one. Use 302 (or 307) only for temporary moves, such as a sale page that will come back. 307 and 308 keep the request method, which matters for forms and APIs, not for normal pages.
Redirect each old page to its closest new equivalent. Sending every old URL to the home page is treated like a 404 by Google.
Before and after you deploy
Back up your .htaccess or server config first: a typo can take the whole site down (Apache answers 500). Put redirect rules near the top, before rules from your CMS. After deploying, test a few old URLs with the redirect checker, update internal links to the new URLs, and resubmit your sitemap.
Frequently asked questions
Where is the .htaccess file?
In your site's root folder (often public_html). It starts with a dot, so turn on "show hidden files" in your file manager or FTP program. Create it if it does not exist; Apache needs AllowOverride and mod_rewrite enabled.
Do the Nginx rules go in a file I upload?
No. Nginx has no per-folder files; paste the rules into the server block of your site's configuration and reload Nginx (test with nginx -t first).
How long should I keep redirects?
At least a year, and ideally permanently. Old links on other sites and in bookmarks keep working only while the redirect exists.
Is anything sent to a server?
No. Everything is generated in your browser, so it works offline once the page has loaded and nothing you type leaves your device.