The first major heatwave of the summer started to lap Sydney's suburbs on Wednesday and is unlikely to fully recede for another week.

Sydney's central business district will be spared the worst of the heat for most of the coming seven days as cooling sea breezes are expected to keep the lid on worst extremes.

Western suburbs, though, sweltered from Wednesday with the mercury in Penrith nudging 40 degrees, with 42 degrees forecast there on Thursday. It may also touch 40 degrees again next Wednesday, the Bureau of Meteorology said.

The NSW Rural Fire Service has also declared a total fire ban for the Sydney and Illawarra/Shoalhaven regions on Thursday.