My idea for protecting whole planets from enemy landing craft are orbital mines. The mines are very small and are located in very low orbits, thus having a larger kinetic energy due to bigger orbital speed. They are not outfitted with any steering mechanism as it would be too much weight, instead they are magnetic and will thus chase any ships that try to land on the planet. There also are thousands and thousands of them, this means that there is a 90 percent chance of colliding with the mines when trying to descend into the atmosphere.
The mines, which would of course often fall to the planet due to orbital decay, are always renewed by small rockets launched from the surface of the planetwhose upper stage, containing many of the mines, explodes when reaching orbit, to let the mines free.
Could this provide adequate protection against incoming alien ships?
Note: I don't care about landing my own ships on the planet. The residents trade the ability to travel into space without danger for protection against invaders.