All warnings will last until at least 6:00 pm on Thursday.
In Madeira, the South Coast and mountainous regions are also under a yellow warning until 6:00 pm today due to the heat.
For today, the IPMA forecasts hot weather with generally clear skies and sometimes strong winds along the coastal strip north of Cabo Raso and in the highlands.
Setúbal is expected to be the hottest city on the mainland, with a maximum temperature forecast of 40 degrees Celsius, followed by Lisbon and Santarém at 39 degrees Celsius.