Redirect sub domain to main domain if not found

Hi,

I have structure of:

domain.com
sub1.domain.com
sub2.domain.com

When enter something before *.domain.com and there is no website it redirects always to first one: sub1.domain.com and I want it to redirect to main domain.com instead. How to achieve it? Thanks.

SOLVED if anyone looking just go to Website Options -> Default website for IP address