High-resolution neutron diffraction and 57Fe Mössbauer experiments have been performed on powder samples of the ternary intermetallic YbFe6Ge6. This compound crystallizes with a hexagonal structure (P6/mmm) which can be described as an ordered state intermediate between the HfFe6Ge6- and YCo6Ge6-type structures, with cell parameters suggesting that the Yb ion is in (or close to) a trivalent state. At room temperature, the Fe-sublattice magnetic arrangement consists of an antiferromagnetic stacking along the c-axis of the ferromagnetic (001) Fe planes with the easy direction of magnetization along [001]. Below about 85 K a spin-reorientation process occurs; a fraction (T) of the iron moments rotate abruptly from the c-axis to a given direction in or close to the basal plane. This phenomenon allows the observation of anisotropic contributions to the total hyperfine field at the Fe site. At 4.2 K, approximately 18% of the iron moments remain along the c-axis. No long-range magnetic order of the Yb sublattice is observed, at least above 1.5 K. We also report 57Fe Mössbauer investigations of the HfFe6Ge6-type LuFe6Ge6 compound.