Aims. We attempt to identify the ionising stars and to determine the photometric distances of nine southern Galactic H ii regions.Methods. We carried out optical spectroscopy and UBV photometry of the stellar content of these objects. The distance of individual stars were obtained by spectroscopic parallax. To avoid using a fixed value for the total-to-selective extinction ratio R V , the reddening A V was determined directly by the colour-difference approach by comparing our V apparent magnitudes and the JHK magnitudes from the 2MASS survey with the intrinsic colour indices. Results. As types O or B, we classified 24 of the 31 stars for which optical spectra were obtained. In particular, we identified two new O stars, one in RCW 98 and the other in RCW 99. The values of reddening obtained correspond to a mean R V = 3.44, which is about 10% higher than the value found for field stars. For three of the H ii regions studied (Bran 186, NGC 2626, and RCW 32), the distance estimates (with errors from 25% to 50%) were based on the data obtained for only one star. For the other six objects (NGC 3503, NGC 6334, RCW 55, RCW 87, RCW 98, and RCW 99), we obtained more precise photometric distances (with a mean error of ≈18%) calculated to be the median of the parallax distances obtained for two to six different stars in each nebulae. The parallax distances of individual stars belonging to a given nebula were similar to each other, with internal errors smaller than 5%, as a consequence of the method used to derive the reddening correction A V . The distance of 1.23 ± 0.30 kpc obtained for RCW 87 disagrees with the value of 7.6 kpc previously found. Conclusions. The dispersion in individual distance estimates for stars in a given nebula can be significantly reduced by calculating the reddening A V from a comparison between the V and the 2MASS JHK magnitudes instead of using A V = R V E(B − V) with a fixed value for R V . Therefore, more precise distances can be calculated with our proposed method.