The magnetic structures of DyFe4Al8 and HoFe4Al8, which have been reported to be unusual spin-glass systems, were studied in detail by neutron diffraction, using both unpolarized and polarized beams. In fact these compounds have long-range magnetic order in both the Fe and rare-earth sublattices. The Fe sublattice orders at 175 K with the moments (1.0 mu B) in the ab plane in a cycloid magnetic structure with a propagation vector along . At similar to 50 K the rare-earth moment starts to order in DyFe4Al8 and follows the modulation of the Fe sublattice. The ordering of the holmium occurs at a slightly higher temperature (similar to 80 K) than the dysprosium. At a lower temperature higher-order harmonics of the modulation develop. The magnetic structure of the rare-earth at low temperature is a bunched elliptical cycloid, following the modulation of the Fe sublattice. Although the antiferromagnetic coupling of the rare-earth magnetic moments has long-range order, giving sharp magnetic satellites in the diffraction patterns, a non-negligible fraction of the 4f moment does not contribute to these peaks but appears as diffuse scattering beneath the Bra,og peaks. This indicates the presence of short-range ferromagnetic correlations between neighboring rare-earth moments. The magnetic structure of the rare-earth sublattice is very sensitive to a small applied magnetic field, mimicking spin-glass behavior in the bulk magnetic properties. The magnetic structure of DyFe4Al8 was studied under an applied magnetic field. A field as low as 0.125 T severely distorts the magnetic modulation and 0.75 T in the nb plane is sufficient to align all the rare-earth moments ferromagnetically. The cycloidal antiferromagnetic coupling of the Fe moments remains unperturbed up to at least 5 T.