App default url, redirected gives 404 on private

I’m redirecting the default root url of my swagger api to /ui, when the visibility is set as private this results in a 404, url not found. When setting the space to public it works perfectly, what can I do so that it also works in private mode?