Contracting infectious diseases as a young child does not protect against developing eczema, researchers say.
Going to day care did reduce allergy incidence
It had been thought that being exposed to infections helped prevent a child from developing allergic conditions such as eczema, asthma and hay fever.
A British Medical Journal study of 24,000 Danish families found this untrue.
But the paper did back previous findings that having pets and siblings, and going to day care, did reduce allergy incidence.
Living on a farm was also confirmed as having a protective effect.
Britain has the highest rate of eczema, asthma, hay fever and other allergies in Europe.
It had been thought that these factors were explained by the 'hygiene hypothesis'.
This suggests reduced exposure to infection in early infancy may increase the risk of developing conditions such as asthma and eczema.
So living conditions which exposed children to bacteria and infections were believed to be beneficial.
But this study suggests while there is a benefit, it is not due to exposure to infections and there must be a different reason for why children benefit from farms, siblings and day care.
It suggests however that exposure to microbes such as viruses and bacteria is still important.
In the study, researchers from the Danish Epidemiology Science Centre interviewed women before and after the birth of their children.
Of the 24,000 children studied, 13,000 had had at least one clinically significant infectious disease - such as a cold or diarrhoea.
Just under 10% suffered from the skin condition atopic
dermatitis, as eczema is called, by the age of 18 months.
The researchers, led by Christine Stabell Benn, concluded: "Infectious disease in the first six months are associated with an increased risk of atopic dermatitis, while the opposite is true for several environmental factors indicative of microbial exposure."
Pamela Ewan, an allergy specialist at Addenbrooke's Hospital in Cambridge, told BBC News Online: "It had been thought that infections in early childhood were a good thing because they were protective.
"A core part of the hygiene hypothesis is that infections in early childhood was a good thing.
"It was thought that having lots of siblings, going to day care and so being exposed to infections.
"But this paper shows that, while having siblings and going to day care is beneficial, it isn't the infections that offer the protective effect."
She said the actual explanation was probably extremely complex, and suggested exposure to bacteria and viruses - without developing an infection - or a mild form of infection which was not studied by the Danish team could offer protection.
Dr Ewan added: "We need more studies to try to dissect what is happening."