LetsCodex0%
Loading the migration studio…
Skip to content
LetsCodex
ServicesWorkBlogProcessToolsPricingTeam
Book audit
ServicesWorkBlogProcessCMS pickerToolsPricingTeamBook a migration audit
LetsCodexLetsCodex
LetsCodex

We migrate growth teams off WordPress to Next.js + a headless CMS.

Next.js · Sanity · Strapi · Payload CMS

Services

WordPress → Next.jsHeadless CMS + Next.jsFigma → Next.jsCMS pickerProcess

Company

WorkBlogPricingTeamPrivacy policy

Contact

hello@letscodex.comBook a migration audit
© 2026 LetsCodexHeadless migration for growth-focused teams
Home/Tools/301 Redirect Generator
Free tool

301 redirect generator.

Paste your old and new URLs and instantly generate redirect rules for Next.js, Vercel, Nginx, or Apache .htaccess. Built for clean migrations — protect your SEO when URLs change. Everything runs in your browser; your URLs are never uploaded.

4 redirects detected

next.config.ts
// next.config.ts — merge this redirects() into your config
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  async redirects() {
    return [
      { source: "/old-blog-post", destination: "/blog/new-post", permanent: true },
      { source: "/services.html", destination: "/services", permanent: true },
      { source: "/about-us", destination: "/about", permanent: true },
      { source: "/products/widget", destination: "/shop/widget", permanent: true },
    ];
  },
};

export default nextConfig;

🔒 Runs entirely in your browser — your URLs are never uploaded.

How it works

From old URLs to a clean redirect map

Three steps to a migration-safe redirect file.

  • 01

    Paste your URL pairs

    One redirect per line — old URL, then new URL, separated by a space, comma, or arrow. Full URLs or paths both work; lines starting with # are treated as comments.

  • 02

    Pick your platform

    Switch between Next.js, Vercel, Nginx, and Apache output. Choose 301 (permanent) for migrations, or 302 for temporary moves.

  • 03

    Copy or download

    Drop the generated rules straight into your config, deploy, and test. Map every old URL to its closest match — never bulk-redirect everything to the homepage.

Why it matters

Redirects are where migrations win or lose SEO

When you change URLs, every link, bookmark, and ranking position points at the old address. A complete, accurate 301 map is what carries that value to the new URL. Skip it — or lazily redirect everything to the homepage — and you can lose rankings overnight.

The fundamentals: redirect each URL to its closest equivalent, keep redirects permanent, avoid chains (A→B→C), and verify them after launch. This tool gives you the rules; getting the mapping itself right is the craft.

Planning a replatform? See our WordPress → Next.js migration service or estimate your migration cost.

async redirects() {
  return [
    { source: "/old-page",
      destination: "/new-page",
      permanent: true },
  ];
}
Redirect FAQ

301 redirect questions

A 301 redirect tells browsers and search engines that a URL has moved permanently to a new address. Use it whenever you change a URL — during a site migration, when restructuring your URLs, or after consolidating pages — so visitors and link equity (your SEO value) carry over to the new location. Use a 302 only for genuinely temporary moves.

Next.js handles redirects in next.config.ts via an async redirects() function that returns an array of { source, destination, permanent } objects. This generator outputs that array for you — paste your old and new URLs, choose the Next.js format, and copy the result straight into your config. Permanent: true produces a 301.

Yes — a complete, accurate 301 map is the single most important SEO step in a replatform. Map every old URL to its closest new equivalent (not just to the homepage), keep them permanent, and test them after launch. That preserves rankings and link equity. Avoid redirect chains, which dilute value and slow load times.

No. The generator runs entirely in your browser using client-side JavaScript. Your URL list never leaves your device and nothing is stored or sent to a server.

Yes. If your destination is a full URL on another domain (https://…), the tool keeps it intact so the redirect points cross-domain. Old URLs are normalised to paths, which is what each platform expects for the source.

They're the same redirects expressed for different stacks: Next.js uses redirects() in next.config.ts; Vercel uses a redirects array in vercel.json; Nginx uses location blocks with return 301; and Apache uses Redirect 301 lines in .htaccess. Pick whichever matches where your site is hosted.

Migrating soon?

We'll map every redirect for you.

A LetsCodex migration includes a full 1:1 URL audit and redirect map, tested through launch with rankings monitored. No URL left behind.

Book a migration audit ↗See the migration service