Can I use a vercel.json file?
Hodifly reads the vercel.json at the root of your repository and applies it at deploy time. For most static projects, migrating from Vercel means changing nothing at all: push the same repository and your redirects, headers, clean URLs and cron jobs carry over. Serverless functions in api/ run too: see the dedicated article "How to create serverless functions?".
What is converted
vercel.json key | What happens on Hodifly |
|---|---|
| Converted to Apache rules. |
| Converted to internal rules: the URL stays as typed while another page is served (the classic SPA fallback |
| Each |
|
|
|
|
| Translated into image optimization with PageSpeed: recompression at configured quality and WebP conversion. |
| Each entry becomes a real cron job on your account, visible and editable in cPanel, Cron Jobs. If your project has a |
| Read from the file at every deploy: they pin the install, the build and the published folder. The project is detected as framework "Vercel" and those fields become read-only in the cPanel form, with a note saying why. Editing |
| Run for real, with or without a vercel.json. See the functions article. |
The deploy log lists exactly what was converted (rule counts) and warns about anything that was not, so you never have to guess.
Precedence
If your repository also contains Netlify-style _redirects or _headers files, they are ignored as soon as a vercel.json exists: one configuration source, no silent merging. The deploy log says so explicitly.
What is not converted, and why
rewritespointing at an external URL (proxying): serving another site through yours needs a proxy layer that shared hosting does not expose. The rule is skipped, with a warning in the deploy log. Redirects to external URLs work fine.has/missingconditions on redirects, rewrites or headers: condition matching on cookies, query or headers is not translatable to per-directory Apache rules. Rules carrying them are skipped, with a warning naming each one.routes(the legacy syntax): migrate those entries toredirects/rewrites/headers; Vercel itself deprecated the key.regions,fluid: platform-specific to Vercel, no equivalent here. Images are served as-is (no optimization pipeline).
Good to know
- The
vercel.jsonfile itself is never served: it is removed from the published output. cleanUrlsandtrailingSlashredirects are safe with SPA rewrites and custom 404 pages: internal rewrites never re-trigger them.- Everything is re-applied on every deploy. Editing
vercel.jsonand pushing is all it takes.
Updated on: 27/07/2026
Thank you!