vercel/next.js · error · Error

To use a multi-match in the destination you must add `*` at

Error message

To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match

What it means

Error "To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match" thrown in vercel/next.js.

Source

Thrown at packages/next/src/shared/lib/router/utils/prepare-destination.ts:338

      }
    }
  }

  try {
    newUrl = destPathCompiler(args.params)

    const [pathname, hash] = newUrl.split('#', 2)
    if (destHostnameCompiler) {
      parsedDestination.hostname = destHostnameCompiler(args.params)
    }
    parsedDestination.pathname = pathname
    parsedDestination.hash = `${hash ? '#' : ''}${hash || ''}`
    parsedDestination.search = destSearch
      ? compileNonPath(destSearch, args.params)
      : ''
  } catch (err: any) {
    if (err.message.match(/Expected .*? to not repeat, but got an array/)) {
      throw new Error(
        `To use a multi-match in the destination you must add \`*\` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match`
      )
    }
    throw err
  }

  // Query merge order lowest priority to highest
  // 1. initial URL query values
  // 2. path segment values
  // 3. destination specified query values
  parsedDestination.query = {
    ...args.query,
    ...parsedDestination.query,
  }

  return {
    newUrl,
    destQuery,

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Append * to the param name in the destination for multi-match segments (e.g. :path*).
Defensive patterns

Strategy: validation

When it happens

Trigger: A rewrite destination uses a multi-match param without a trailing *.

Common situations: A redirects/rewrites destination referencing a catch-all param not marked with *.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/3c53d69259678b4a. Report an issue: GitHub.