Home / Web tools / 301 Redirect Rule Generator

301 Redirect Rule Generator

SEO

Convert a list of old and new URLs into ready-to-deploy 301 or 302 redirect rules for Vercel (vercel.json), Apache (.htaccess), Netlify, and Nginx.

Target server / platform

Validation checks

Generated Redirect Rules


      

Test your redirects after deploying to confirm they return a single 301/302 hop with no redirect chains or loops.

When to use 301 vs 302 redirects

Whenever you change a URL slug, merge duplicate articles, or migrate a site, a 301 Permanent Redirect tells Google to transfer indexing signals and link equity to the new URL.

Use a 302 Temporary Redirect only for short-term A/B tests, seasonal promos, or maintenance pages where the old URL will return.

PlatformWhere the rules goSyntax note
Vercelvercel.json (root)JSON redirects array with permanent: true
Apache.htaccess (root)Redirect 301 /old/ /new/
Netlify_redirects (publish dir)/old/ /new/ 301!
Nginxserver { } blockrewrite ^/old/$ /new/ permanent;

Best practices to preserve SEO traffic during redirects

  1. Redirect directly to the final destination—avoid multi-hop chains (A → B → C).
  2. Update internal links and your XML sitemap so they point straight to the new URLs.
  3. Avoid redirecting every old URL to the homepage; always match each old page to its closest equivalent topic.

Frequently asked questions

Do 301 redirects pass PageRank in 2026?

Yes. Google has confirmed that 301 and 302 redirects do not lose PageRank, though pointing old URLs to irrelevant pages (like the homepage) is treated as a soft 404.

How long should I keep 301 redirects active?

Keep them active for at least 1 year—and ideally permanently—so bookmarks, backlinks, and crawlers never hit a 404.

Can I paste full https:// URLs as the old path?

Yes, this generator automatically extracts the path from full source URLs for Vercel, .htaccess, Netlify, and Nginx rules.