301 Redirect Generator
Generate 301 redirect rules for Apache (.htaccess), Nginx, or a plain JSON map online for free — from a list of old and new URLs, instantly.
What is a 301 redirect?
A 301 redirect permanently sends visitors and search engines from an old URL to a new one, passing along most of the original page's ranking signals. It's the standard way to handle moved pages, renamed URLs, or a domain migration without losing existing search traffic or breaking bookmarked links.
This tool takes a list of old-URL / new-URL pairs and produces ready-to-use rules for Apache's .htaccess, Nginx config, or a plain JSON redirect map.
GuideHow to use it
How the rules are built
For Apache, each pair becomes a Redirect 301 directive. For Nginx, each becomes a rewrite ... permanent; block. The JSON format outputs a simple old-to-new key/value map that's easy to feed into a custom redirect middleware or serverless function.
Features & benefits
Why this runs entirely in your browser
Redirect maps can reveal a site's URL structure or migration plans, so nothing is uploaded. The rules are assembled in JavaScript locally in the tab, which means it keeps working offline once the page has loaded.
Common uses
Redirecting old URLs after a site restructure, mapping legacy pages during a domain migration, or generating a batch of redirects after renaming a set of product or blog URLs.
Frequently asked questions
A few things people usually want to know before trusting the numbers.
A 301 signals a permanent move and passes most ranking signals to the new URL, while a 302 signals a temporary move and search engines keep indexing the old URL.
Into your site's .htaccess file, typically in the root directory, or into the main Apache virtual host configuration.
Inside the relevant server block in your Nginx configuration file, then reload or restart Nginx for the changes to take effect.
It's a plain old-to-new URL map that's easy to load into custom redirect logic — for example, a Next.js middleware or a serverless function.
No. All rules are generated locally in your browser. Nothing entered here is sent to a server, stored, or shared.