SEO

301 Redirect Generator

Paste your old and new URLs as pairs and get clean, copy-paste redirect rules for Nginx or Apache — so a site migration doesn't cost you the rankings you've already earned.

One pair per line. Separate old and new with a comma, a tab, or a space.

0 redirects
nginx.conf

A migration without redirects is a self-inflicted traffic drop

The single most common way sites lose organic traffic overnight is changing URLs without redirecting the old ones. Every page that once ranked, every backlink someone built to your old address, every bookmark — all of it points into a wall of 404s the moment you relaunch. Search engines eventually drop those dead URLs and, with them, the authority they carried. A 301 redirect is the bridge: it forwards both the visitor and the accumulated ranking signal to the new address, so the work you've already done keeps paying off instead of evaporating. Map every old URL to its closest new equivalent before you flip the switch, not after the traffic graph nosedives.

Redirect to the closest match, never just the homepage

When you're under deadline it's tempting to point every retired URL at the homepage and call it done. Resist it. A redirect to an irrelevant destination is treated by Google much like a soft 404, and it's a poor experience for the visitor who wanted that specific page. Send each old URL to the most relevant live page you have — the replacement article, the equivalent product, the parent category if nothing better exists. Avoid chains, too: redirecting A to B to C wastes crawl budget and leaks a little signal at each hop, so always point the old URL straight at its final destination.

Ready to go further?

TrafficBud.io

One snippet is a start. TrafficBud audits your whole site, finds the keywords you're missing, and hands you a monthly SEO plan.

FAQ

Frequently asked questions

When should I use a 301 redirect?

Use a 301 (permanent) redirect whenever a page's URL changes for good — a site migration, a restructured URL, merging duplicate pages, or moving from HTTP to HTTPS. A 301 passes nearly all of the old URL's ranking signals to the new one and tells browsers and search engines to update their records.

What's the difference between 301 and 302?

A 301 is permanent and consolidates ranking signals onto the destination URL. A 302 is temporary and tells search engines to keep the original URL indexed. Use 302 only for genuinely temporary moves, like a seasonal page or A/B test; for anything permanent, use 301.

Where do I put these redirect rules?

Nginx rules go inside the relevant server block in your site config, then reload Nginx. Apache rules go in your .htaccess file (with mod_rewrite enabled) or the virtual host config. Always test a few redirects after deploying to confirm they resolve to the correct destination with a 301 status.

Keep going

Related free tools