We know the total amount of material made of atoms is around one-fifth of the total amount of dark matter, the invisible mass in the universe. So nothing that is made of atoms, or that ever was made of atoms, can be a significant portion of dark matter. This rules out planets, dim and dead stars, etc., which are made of atoms. This result comes from many astronomical measurements using different techniques: the remnant microwave glow that fills the cosmos, deuterium (aka heavy hydrogen) abundances in distant galaxies, and direct searches for these objects.
Astronomy magazine subscribers can read the full answer for free. Just make sure you're registered with the website.