google search console – Several domains on a site indexing problem

I have a site with several domains pointed to it as aliases. For example: (main domain)

All are directed to the same server, so everything on also appears on & The problem is that google indexes & and not the main domain I'm thinking about.

Can any one learn what to do for this problem?