Ready to generate
Add source → destination pairs and click Generate// map source to destination, export redirect rules instantly
Build clean redirect rules from source and destination URL mappings. Generate .htaccess, Nginx, JSON, or CSV output instantly — free, browser-based.
Ready to generate
Add source → destination pairs and click GenerateEnter source paths and destination URLs row by row, or use Bulk Paste to import many at once.
Select 301/302/307/308 and pick output: .htaccess, Nginx, JSON, or CSV.
Click Generate Rules, then copy the output or download the file directly.
Redirect Rule Builder lets you map old URLs to new destinations and instantly export ready-to-use redirect rules. Whether you're migrating a site, restructuring URLs after a redesign, or fixing broken links — this tool generates correct Apache .htaccess RewriteRules, Nginx return directives, JSON arrays, or CSV files in seconds.
A 301 is a permanent redirect — it tells browsers and search engines the page has moved forever. A 302 is temporary, meaning the original URL may return. For SEO purposes, use 301 when permanently moving content so link equity transfers to the new URL.
307 (Temporary Redirect) and 308 (Permanent Redirect) are similar to 302 and 301 but guarantee the HTTP method doesn't change. Use them when redirecting POST requests to avoid the browser converting POST to GET.
Copy the generated rules and paste them into your .htaccess file in your web root. Make sure mod_rewrite is enabled on your Apache server. Each rule uses RewriteRule to match the source path and redirect to the destination.
Click the Bulk Paste button and paste your URL pairs — one pair per line, separated by a tab, comma, or space. The tool will automatically parse and create rows for each pair.
The current version handles exact path matches. For complex wildcard patterns in .htaccess, you'd write the RewriteRule manually. The generated output is a clean starting point you can customize further.
Yes — completely free, browser-based, and requires no account or sign-up. All processing happens server-side with no data stored. Use it as many times as you need.
A redirect rule builder is a tool that lets you quickly create URL redirect mappings and export them in formats your web server can understand. Instead of hand-writing RewriteRule directives or Nginx return statements — which are easy to get wrong — you simply paste in your old and new URLs, choose your settings, and get production-ready code in seconds.
Whether you're moving from one domain to another, restructuring a site after a redesign, or consolidating content for SEO, having clean redirect rules is essential. A single malformed redirect can break user experience and cost you search rankings.
💡 Looking for premium web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and assets — worth checking out.
When you change a URL, any incoming links pointing to the old address become broken. For users, this means a frustrating 404 error. For search engines, it means the ranking signals built up for that page are lost unless you implement a proper redirect.
A 301 permanent redirect is the standard solution. It signals to Google and other search engines that the content has permanently moved, and transfers virtually all link equity to the new URL. You should implement 301 redirects any time you permanently change a URL, merge pages, or migrate domains.
A 302 temporary redirect is appropriate when you need to temporarily send users elsewhere — for example during maintenance or A/B testing — with the intention of restoring the original URL later. Using a 302 when you mean 301 is a common mistake that can dilute link equity.
Apache's mod_rewrite module powers the most widely-used redirect system on the web. The generated .htaccess output from this tool uses RewriteRule directives to match incoming request paths and redirect them to new destinations.
A typical redirect rule looks like:
RewriteEngine On
RewriteRule ^old-page$ https://example.com/new-page [R=301,L]
The ^old-page$ pattern matches the path exactly. The [R=301,L] flags tell Apache to respond with a 301 and stop processing further rules. Our builder generates this pattern correctly so you don't need to worry about escaping or anchoring.
For Nginx servers, redirects use a different syntax. Instead of RewriteRule, you use location blocks with a return directive:
location = /old-page {
return 301 https://example.com/new-page;
}
The = modifier means an exact match, which is faster than prefix or regex matching. This is ideal for a list of specific URL redirects. Our builder generates these blocks ready to paste into your Nginx config file.
When migrating a large site, you might have hundreds of URLs to redirect. The Bulk Paste feature lets you import a list of URL pairs all at once. Prepare your list in a spreadsheet as two columns (source, destination), copy-paste them into the bulk input area, and the tool creates all the rows instantly.
This is especially useful for CMS migrations, domain consolidations, SEO cleanup, and category restructuring after reorganizing site navigation.
Beyond .htaccess and Nginx, this tool also exports redirects as a JSON array or CSV file. These formats are useful when implementing redirects in a JavaScript-based framework like Next.js or Nuxt, using a CDN like Cloudflare or Vercel that accepts redirect rules in JSON format, or sharing the mapping with your team in a spreadsheet-friendly format.
A few guidelines to get the most out of your redirect configuration:
With this Redirect Rule Builder, you can generate correct, clean redirect rules in the right format for your server — saving time and reducing the risk of configuration errors during site migrations.