The gastrointestinal (GI) tract of newly hatched fish is probably colonized by bacteria present in the water, but how environmental and internal factors affect the development of the GI microbiota is poorly understood. In this study, we investigated the effect of diet and of rearing in separate tanks on the cod larval microbiota. Cod larvae were fed three different live feed diets. For each diet, larvae were reared in three replicate tanks. The microbial communities were investigated for water, live feed and individual larvae using a PCR/DGGE (Denaturing Gradient Gel Electrophoresis) strategy. Statistical tests were applied to investigate differences in the larval microbiota between groups of individuals. We found no differences in the larval microbiota due to diet after 8 dph (days post hatching). Moreover, the larval microbiota was similar at 17 and 32 dph, despite a change in live feed at 18 dph. The larval microbiota was generally more similar to the water microbiota than to live feed microbiota. We further found that rearing of larvae in replicate tanks with identical diet could result in significant differences in larval microbiota. These findings indicate that diet does not entail major changes to the composition of cod larval microbiota.