Hello, I’m new to netlify and have had some problems getting my site working. I’m using a serverless express backend and create-react-app for the client.
It’s a pretty odd issue-- when I deploy the site to production at this url: https://honkurls.netlify.app/, everything works exactly as expected. It’s a url shortener, so https://honkurls.netlify.app/ goes to the homepage and https://honkurls.netlify.app/yt redirects to the express app where it redirects to a youtube link or whatever.
However, when accessing it via the custom domain I set up, https://honk.gq, it redirects to /.netlify/functions/server/
(where the express app is) regardless of whether or not a path is specified. This results in the error Cannot GET /.netlify/functions/server/
.
The expected behavior is for this redirect only to occur if there’s something after the / in the url so that the client can be redirected. (because it redirects either way, shortened urls do work e.g. https://honk.gq/yt redirects to youtube.)
I imagine it has something to do with the _redirect
file, but at the same time it’s odd that it works on the default url but not on the custom one. At any rate, here’s the contents of my _redirect:
/home /
/* /.netlify/functions/server/:splat
I’m not sure what I’m doing wrong but any help or suggestions would be really appreciated, this has been giving me a headache for hours
EDIT: Also, I’ve sent the honk.gq link so some friends and they report that it works as normal. I tried it in another browser and it worked there, but it’s still not working in my main browser.
It’s the same for them now. Only the https://honkurls.netlify.app/ link works.