We investigate the properties of the host galaxies of compact binary mergers across cosmic time. To this end, we combine population synthesis simulations together with galaxy catalogues from the hydrodynamical cosmological simulation eagle to derive the properties of the host galaxies of binary neutron stars (BNS), black hole-neutron star (BHNS) and binary black hole (BBH) mergers. Within this framework, we derive the host galaxy probability, i.e., the probability that a galaxy hosts a compact binary coalescence as a function of its stellar mass, star formation rate, K s magnitude and B magnitude. This quantity is particularly important for low-latency searches of gravitational wave (GW) sources as it provides a way to rank galaxies lying inside the credible region in the sky of a given GW detection, hence reducing the number of viable host candidates. Furthermore, even if no electromagnetic counterpart is detected, one can still use the proposed ranking criterion to classify the galaxies contained in the error box. Our results show that massive galaxies (or equivalently galaxies with a high luminosity in K s band) have a higher probability of hosting BNS, BHNS, and BBH mergers. We provide the probabilities in a suitable format to be implemented in future low-latency searches.