We consider the composition operators acting on the real‐valued homogeneous Besov or Triebel–Lizorkin spaces, realized as dilation invariant subspaces of , denoted as . If and , then any function acting by composition on is necessarily linear. The above conditions are optimal: (i) in case , (Besov space), (Triebel–Lizorkin space), is a quasi‐Banach algebra for the pointwise product, (ii) in case , , , any function such that is a finite measure, and , acts by composition on .