We have studied the alignment of a nematic liquid crystal (LC) material on aluminum subwavelength nanogratings as a function of the period, p, and the slit width to period ratio, w/p. A method, based on Fourier analysis of the transmittance spectra of the LC grating system, has been applied. We show that the gratings provide stable planar alignment only for shorter periods and narrower slits (p < 400 nm, w/p < 2/3). As these parameters increase, the homogeneous surface alignment changes to domains with different tilt angles or to spatially modulated alignment. We have also obtained a 90° twisted LC director distribution, implying sufficiently strong azimuthal LC anchoring at the grating surface.