There is mounting evidence that ultra-energetic neutrinos of astrophysical origin may be associated with blazars. Here, we investigate a unique sample of 47 blazars, ∼20 of which could be new neutrino sources. In particular, we focus on 17 objects of yet unknown redshift, for which we present optical spectroscopy secured at the Gran Telescopio Canarias and the ESO Very Large Telescope. We find all sources but one (a quasar) to be BL Lac objects. For nine targets we are able to determine the redshift (0.09 < z < 1.6), while for the others we set a lower limit on it, based on either the robust detection of intervening absorption systems or on an estimation derived from the absence of spectral signatures of the host galaxy. In some spectra, we detect forbidden and semiforbidden emission lines with luminosities in the range 1040-1041 erg s-1. We also report on the spectroscopy of seven blazars possibly associated with energetic neutrinos that partially meet the criteria of our sample and are discussed in the Appendix. These results represent the starting point of our investigation into the real nature of these objects and their likelihood of being neutrino emitters.