Skip to main content
Routing Pipeline

Free Redirect Map Compiler

Routing Rules Map3 Vectors Loaded
1
2
3
Output Deployment Rules
// next.config.js
module.exports = {
  async redirects() {
    return [
      {
        source: '/old-blog-post',
        destination: '/blogs/optimizing-nextjs-15-core-web-vitals',
        permanent: true,
      },
      {
        source: '/tools/image-optimizer',
        destination: '/tools/image-converter',
        permanent: true,
      },
      {
        source: '/contact-us',
        destination: '/contact',
        permanent: true,
      }
    ];
  },
};

What Is a Redirect Compiler?

Turn old and new URL paths into server-ready 301 redirect configuration for Next.js, Nginx, or Apache.

How to Use the Redirect Compiler

  1. Add redirect rows: Enter each old path (source) and its new destination path.
  2. Review loop warnings: Fix any self-loops or cyclical chains flagged in red.
  3. Choose your server: Select Next.js, Nginx, or Apache output format.
  4. Copy the config: Click Copy Build and paste into next.config.js, nginx.conf, or .htaccess.

Redirect Rule Format

source path → destination path (301 permanent)

Example

After renaming tool routes, you map /tools/image-optimizer/tools/image-converter/ and /contact-us/contact/. Select Next.js, copy the generated redirects() array, and paste it into your next.config.js before deploying.

Common Use Cases

  • CMS or platform migrations with hundreds of changed URLs
  • Consolidating duplicate pages after a site restructure
  • Generating Nginx or Apache rules for legacy server configs

Related Tools

Browse all

Frequently Asked Questions

Why use 301 redirects?

A 301 redirect tells search engines a page permanently moved. It passes ranking signals to the new URL and prevents 404 errors after a migration.

Does this tool detect redirect loops?

Yes. It checks for self-referencing paths and cyclical chains (A → B → A) and warns when chains exceed three hops.

Which server formats are supported?

Export rules for Next.js (next.config.js), Nginx rewrite directives, or Apache .htaccess Redirect 301 lines.

Can I migrate hundreds of URLs at once?

Yes. Add as many source-to-destination rows as you need. The compiler generates the full config in one output block.

Are my URLs sent to a server?

No. All mapping, loop detection, and code generation run in your browser. Your URL lists are never uploaded or stored.

What is a redirect chain and why avoid it?

A chain happens when A redirects to B, which redirects to C. Each hop adds latency and dilutes SEO value. Point old URLs directly to their final destination.