Redirect if the domain does not exist


Guys, is it possible to do a global redirect in cases where there is no domain, for example, if I have nothing on ->, or -> - now Traefik will just open a 404 page, if subdomain is non-existent it will be with certificate warning -> 404, if it's just 404... and etc. is it possible to add such a redirect?

I remember that such a redirect is possible, for example, in the nginx proxy manager.


Hey guys! Any suggestions? Thanks in advance!