Redirect if the domain does not exist

Hi!

Guys, is it possible to do a global redirect in cases where there is no domain, for example, if I have nothing on mydomain.com -> google.com, or non-existent.mydomain.com -> google.com - now Traefik will just open a 404 page, if subdomain is non-existent it will be with certificate warning -> 404, if mydoman.com 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.

Thanks.

Hey guys! Any suggestions? Thanks in advance!