[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Redirect automatically loses subpath when using the default Vercel domain

25 views · 1 like · 2 posts


Tuan Anh (@anhnguyentuan2-5616) · 2025-12-30

Hi everyone, I’m currently using custom redirect in the Firewall section of the Vercel dashboard, but I’m running into an issue.

In my code, I’m using Vercel’s default domain with subpaths, for example:
`.vercel.app/abc/def?ghi=...&klm=...`

However, when the redirect happens, it automatically redirects to
`subdomain?ghi=...&klm=...`, and my subpath is lost.

Is there a way to configure this directly in the Vercel dashboard so that the redirect preserves the subpaths?

Thank you everyone.


Jacob Paris (@jacobparis) · 2026-01-06 · ♥ 1

The firewall redirects don't support wildcards, but you can do it with the redirects in your vercel.json file

```
{
  "redirects": [
    {
      "source": "/(.*)",
      "destination": "https://your-custom-domain.com/$1",
      "permanent": false
    }
  ]
}