sanitary conditions and diet are important elements determining the occurrence of pathogens in animals. The aim of the research was to assess the effect of an experimental diet with rye and xylanase for broiler chickens in cages and in a free-range system on the intestinal microbiome. The study was carried out in two experimental stages, the first on 224 1-d-old male Ross 308 chickens with an initial weight of 41 g, and the second on 2000 1-d-old male chickens with an initial weight of 42 g. All birds were reared to 42 d of age and fed crumbled starter (1 to 21 d) and pelleted grower–finisher (22 to 42 d) isonitrogenous and isoenergetic diets, supplemented with 20% rye and/or 200 mg/kg xylanase. directly after slaughter, bacteria were isolated from the cloaca of birds and identified using classical microbiological methods and MALDI-TOF mass spectrometry. The antibiotic susceptibility of the bacteria was assessed by the disc diffusion method. The study showed the presence of abundant bacteria in the gut microbiome of chickens kept in both housing systems. The most frequently isolated bacteria were Escherichia coli, Enterococcus spp., Proteus spp., Campylobacter spp., and Staphylococcus spp. Antibiotic resistance was significantly higher in E. coli, Proteus spp., and Campylobacter spp. obtained from chickens from the free-range farm, but in the case of Enterococcus and Staphylococcus, resistance was higher in bacteria from caged birds. The high antibiotic resistance among pathogens of the gastrointestinal tract necessitates the search for means to control the microbiome in favour of beneficial bacteria. The significant influence of rye and xylanase on the bacterial content may be the basis for the introduction of this method to support the control of pathogens.