This study aimed to provide novel insights into the gastrointestinal microbial diversity from different gastrointestinal locations in weaning piglets using PCR-restriction fragment length polymorphism (PCR-RFLP). Additionally, the effect of different feed additives was analyzed. Thirty-two piglets were fed with four different diets: a control group and three enriched diets, with avilamycin, sodium butyrate, and a plant extract mixture. Digesta samples were collected from eight different gastrointestinal segments of each animal and the bacterial population was analysed by a PCR-RFLP technique that uses 16S rDNA gene sequences. Bacterial diversity was assessed by calculating the number of bands and the Shannon-Weaver index. Dendrograms were constructed to estimate the similarity of bacterial populations. A higher bacterial diversity was detected in large intestine compared to small intestine. Among diets, the most relevant microbial diversity differences were found between sodium butyrate and plant extract mixture. Proximal jejunum, ileum, and proximal colon were identified as those segments that could be representative of microbial diversity in pig gut. Results indicate that PCR-RFLP technique allowed detecting modifications on the gastrointestinal microbial ecology in pigs fed with different additives, such as increased biodiversity by sodium butyrate in feed. © 2014 Mercè Roca et al.