Young stars and planets both grow by accreting material from the proto-stellar disks. Planetary structure and formation models assume a common origin of the building blocks, yet, thus far, there is no direct conclusive observational evidence correlating the composition of rocky planets to their host stars. Here we present evidence of a chemical link between rocky planets and their host stars. The iron-mass fraction of the most precisely characterized rocky planets is compared to that of their building blocks, as inferred from the atmospheric composition of their host stars. We find a clear and statistically significant correlation between the two. We also find that this correlation is not one-to-one, owing to the disk-chemistry and planet formation processes. Therefore rocky planet composition depends on the chemical composition of the proto-planetary disk and contains signatures about planet formation processes.