BackgroundRye intake has been associated with beneficial effects on health in human interventions, possibly due to dietary fiber in rye. In dogs, few studies have explored the effects on health of dietary fiber in general, and rye fiber in particular. The aim of this study was to investigate how inclusion of rye, compared with wheat, influenced fecal microbiota composition, short chain fatty acids (SCFA) and apparent total tract digestibility (ATTD) in dogs. Six male Beagle dogs (mean age 4.6 years, SEM 0.95 years; mean body weight 14.6 kg, SEM 0.32 kg) were fed three experimental diets, each for 21 days, including an adaptation period of six days and with 2–2.5 months between diet periods. The diets were similar regarding energy and protein, but had different carbohydrate sources (refined wheat (W), whole grain rye (R), or an equal mixture of both (RW)) comprising 50% of total weight on a dry matter (DM) basis. The diets were baked and titanium dioxide was added for ATTD determination. Fecal samples were collected before and in the end of each experimental period. Fecal microbiota was analyzed by sequencing 16S rRNA gene amplicons and fecal SCFA by high-performance liquid chromatography. Crude protein, crude fat, neutral detergent fiber, and gross energy (GE) in food and feces were analyzed and ATTD of each was determined. Univariate and multivariate statistical methods were applied in data evaluation.ResultsFaecal microbiota composition, differed depending on diet (P= 0.002), with samples collected after consumption of the R diet differing from baseline. This was primarily because of a shift in proportion ofPrevotella, which increased significantly after consumption of the R diet (P< 0.001). No significant differences were found for SCFA, but there was a tendency (P< 0.06) for higher molar proportions of acetic acid following consumption of the R diet. The ATTD of crude protein, crude fat, neutral detergent fiber, and GE was lower after consumption of the R diet compared with the other diets (P< 0.05).ConclusionsConsumption of the R diet, but not RW or W diets, was associated with specific shifts in microbial community composition and function, but also with lower ATTD.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12917-023-03623-2.