Proper way to 301 redirect myapp.fly.dev/* to custom-domain.org/*

Hi,

Is that custom-domain.org hosted on Fly or indeed the same app?

Only it’s not currently possible to turn off access to name.fly.dev (e.g Disable the default domain) and so I was wondering if your intent here was to block access using name.fly.dev to enforce custom-domain.org? If so … I wonder if there is some loop, where the redirect is coming back … but the custom domain … returns the redirect. And so on.

If not, I’m not sure why a 301 returned by your app would not be simply returned to the client :thinking: The proxy has no need to get involved in that. Maybe try redirecting to a totally separate non-Fly site, like e.g google.com or something as a quick test, and see what happens?

3 Likes