So I have issue in web server. The thing is I don’t have index.html instead I have pages/home/home.html. so how can I tell vercel to use my home.html to display in the domain. Can we change that in any settings?
Hi, Mayur! Welcome to the Vercel Community ![]()
You can configure Vercel to use your pages/home/home.html file as the main page for your domain by creating a vercel.json configuration file with rewrites. This file should be placed in the root of your project.
{
"rewrites": [
{ "source": "/", "destination": "/pages/home/home.html" },
{ "source": "/:path*", "destination": "/:path*" }
]
}
This configuration tells Vercel to:
- Serve the
/pages/home/home.htmlfile when someone visits the root of your domain - Serve all other paths normally
The rewrites are processed in order, so the first matching rule will be used.
Let us know how you get on!
1 Like
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.