The magnetic properties of Ho 2 Co 1 7 - x Al x and Dy 2 Co 1 7 - x Al x compounds (x = 2, 3, 4 and 5) have been investigated by magnetic measurements and X-ray diffraction. The compounds with x = 5 do not stabilise in a 2-17 structure. The Ho 2 Co 1 7 - x Al x compounds with x = 2, 3 and 4 show with increasing temperature, a spin reorientation from the basal plane to the c-axis. The origin of this reorientation is the change in the Co-sublattice anisotropy from planar to easy-axis upon substitution of Al for Co. This has been confirmed by measurements on Y 2 Co 1 7 - x Al x . The spin reorientation shifts to lower temperatures with increasing Al concentration, indicating that the strength of the easy-axis Co-sublattice anisotropy increases. As the Dy-sublattice anisotropy is significantly larger than the Ho-sublattice anisotropy, the Dy compounds show no spin reorientation. The Curie temperatures of both series decreases linearly but strongly with increasing Al concentration.