app/shop/[[...slug]]app/shop/[[...slug]] is correct. Double brackets make the catch-all optional, so it also matches /shop, where slug is undefined. The tempting app/shop/[...slug] is wrong because it needs at least one segment after /shop. app/shop/(slug) is a route group, which adds nothing to the URL.