I think this should be true...
As a comet gets closer to the sun, the ice on the surface of the nucleus begins turning into gas, forming a cloud known as the coma. ... Since comet tails are shaped by sunlight and the solar wind, they always point away from the sun.