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