During a hot summer we need to ensure that goats can find ways to avoid overheating, suffering heat stress and, in the worst cases, getting heat stroke. They run the most risk during hot, humid days. Make sure they have plenty of cool, clean water on such days and that they always have access to shade and shelter. When indoors, make sure their barn is well ventilated.
If goats are panting or reluctant to move out of the heat, they are likely to be heat stressed and you should take immediate steps to cool them down by moving them to shade, offering them cool drinking water or dampening their legs.
Here are two articles with good tips on how to prevent and treat heat stress:
It is good to choose the kind of goat that is well adapted for the climate that you live in. If your region is predominantly hot, breeds adapted to desert conditions will cope better. Large ears and tall bodies dissipate heat more. All goats use their horns and ears to regulate their heat so removing horns will limit this feature. Mountain goats, like Alpines, adapt to a wide range of temperatures, but cope less well with humidity and rainy seasons. Lowland and cold weather goats, like all north European primitives, are hardy in cold and damp climates.