Space radiation

How Does Earth Protect Itself from Space Radiation?

Earth is exposed to harmful space radiation that affects all creatures. But how Earth protects itself from space radiation?