export-no-custom-routes.mdx
title: Export Custom Routes
Why This Error Occurred
In your next.config.js you defined rewrites, redirects, or headers along with output: 'export' (or you ran next export).
These configs do not apply when exporting your Next.js application manually.
Possible Ways to Fix It
- Remove
rewrites,redirects, andheadersfrom yournext.config.jsto disable these features or - Remove
output: 'export'(ornext export) in favor ofnext startto run a production server
Useful Links
Rendered from the public repository vercel/next.js on GitHub; content belongs to its authors. Cached for up to an hour.