  Magnetic protection of potentially habitable planets plays a central role in
determining their actual habitability and/or the chances of detecting
atmospheric biosignatures. We develop here a thermal evolution model of
potentially habitable Earth-like planets and super-Earths. Using up-to-date
dynamo scaling laws we predict the properties of core dynamo magnetic fields
and study the influence of thermal evolution on their properties. The level of
magnetic protection of tidally locked and unlocked planets is estimated by
combining simplified models of the planetary magnetosphere and a
phenomenological description of the stellar wind. Thermal evolution introduces
a strong dependence of magnetic protection on planetary mass and rotation rate.
Tidally locked terrestrial planets with an Earth-like composition would have
early dayside magnetospause distances between 1.5 and 4.0 Rp, larger than
previously estimated. Unlocked planets with periods of rotation ~1 day are
protected by magnetospheres extending between 3 and 8 Rp. Our results are
robust against variations in planetary bulk composition and uncertainties in
other critical model parameters. For illustration purposes the thermal
evolution and magnetic protection of the potentially habitable super-Earths GL
581d, GJ 667Cc and HD 40307g were also studied. Assuming an Earth-like
composition we found that the dynamos of these planets are already extinct or
close to being shut down. While GL 581d is the best protected, the protection
of HD 40307g cannot be reliably estimated. GJ 667Cc, even under optimistic
conditions, seems to be severely exposed to the stellar wind and, under the
conditions of our model, has probably suffered massive atmospheric losses.
