The pure rotational transitions of the protonated hydrogen cyanide ion, HCNH+, and its isotopic species, HCND+ and DCND+, were measured in the 107 - 482 GHz region with a source modulated microwave spectrometer. The ions were generated in the cell with a magnetically confined dc-glow discharge of HCN and/or DCN. The rotational constant B0 and the centrifugal distortion constant D0 for each ion were precisely determined by a least-squares fitting to the observed spectral lines. The observed rotational transition frequencies by laboratory spectroscopy and the predicted ones are accurate in about 30 to 40 kHz and are useful as rest frequencies for astronomical searches of HCNH+ and HCND+.