Dietary supplements may help if you are deficient in the vitamin or nutrient
Scientists say they can find no convincing evidence to show that taking vitamin D supplements will fend off a cold.
A New Zealand team did the "gold standard" of tests - a randomised placebo-controlled trial - to see what impact the supplements would have, reports the BBC.
The 161 people who took daily vitamin D for 18 months caught as many colds as the 161 who took fake pills.
The study was reported in the Journal of the American Medical Association.
But a leading UK cold expert said vitamin D was useful.
Prof Ronald Eccles, of the Common Cold Centre at Cardiff University, said it can give the immune system a much-needed boost during winter when vitamin D reserves may be low.
He said he takes it every year as a precaution.
"There is sufficient information to indicate that vitamin D is a vital vitamin for the immune system.
"Supplementation might help to support the immune system over the winter when we are short of vitamin D."
He said echinacea supplements may also help ward off coughs and colds, but added: "Supplements do not work for everybody because people's immune systems are different. It's not a case of one size fits all."
They are pointless unless you are deficient, he said.
We get most of our vitamin D from sunlight on our skin, but it is also found in certain foods like oily fish, eggs and breakfast cereals.
Most people should be able to get all the vitamin D they need by eating a healthy balanced diet and by getting some summer sun.
The study, carried out in New Zealand, which gets more sunshine annually than the UK, found the vitamin D supplements increased blood levels of the vitamin.
But this had no significant impact on the rate or severity of colds.
The vitamin D group caught an average 3.7 colds per person compared with 3.8 colds per person for the placebo group.
There was no significant difference between the two groups in the number of days missed off work as a result of cold symptoms or duration of symptoms.
Adults catch between two to four colds a year and children up to 10 a year.