Subdomain Redirect URL to API Endpoint not Working
Unanswered
Barbary Lion posted this in #help-forum
Barbary LionOP
I've created an endpoint on my personal portfolio to retreive my most current resume. (https://www.moody.mx/api/files/resume). I want to have a subdomain like (https://resume.moody.mx) to redirect to this api endpoint so I've followed the resources here (https://vercel.com/guides/can-i-redirect-from-a-subdomain-to-a-subpath) on how to do it. After creating a vercel.json file and pushing it to my deployed branch, I get an error that the deployment is not found. Do I also need to configure the subdomain as a CNAME in my DNS records and if so, what do I put as the destination url? Here is my git repo in case this helps (https://github.com/gg-blake/portfolio).
1 Reply
Barbary LionOP
Also here is my current vercel.json file:
{
"rewrites": [
{
"source": "/:path*",
"has": [
{
"type": "host",
"value": "resume.moody.mx"
}
],
"destination": "/api/files/resume"
}
]
}