301 & 302 Redirect Rule Generator
Generate clean 301/302 redirect rules for Apache .htaccess, Nginx, Netlify _redirects, and Vercel vercel.json.
Privacy Notice: Runs locally in your browser without uploading files to external servers or requiring an account.
Interactive Browser Workspace
Loading the interactive 301 & 302 Redirect Rule Generator workspace. Enable JavaScript in your browser to run calculations and conversions locally.
How to Use 301 & 302 Redirect Rule Generator
- Enter one `old-path -> new-path` mapping per line (or comma-separated).
- Select HTTP status code (301 permanent or 302 temporary) and target platform to generate ready-to-use config.
Methodology & Accuracy
Normalizes path prefixes and formats server-specific syntax for Apache mod_alias, Nginx `return`, Netlify `_redirects`, and Vercel JSON.
Examples
- Migrate `/old-blog-post` to `/guides/new-post` with a 301 permanent redirect across Nginx or Netlify.
Scope & Limitations
- Always test generated server config files in a staging environment before deploying to production.
Frequently Asked Questions
When should I use 301 vs 302?
Use 301 for permanent URL moves so search equity transfers, and 302 only for temporary redirects.
Related Tools
- Canonical URL Checker - Inspect pasted HTML for <link rel="canonical"> tags, protocol consistency, tracking parameters, and self-referencing alignment.
- Robots.txt Generator - Generate valid RFC 9309 robots.txt files with user-agent rules, allow/disallow paths, crawl delay, and sitemap URLs.
- HTML Link Structure Checker - Inspect pasted HTML for malformed hrefs, unsafe schemes, private/local hosts, missing #id anchor targets, spaces in URLs, and unencrypted HTTP links.