Dietary fiber in dog food is reported to promote healthy gut microbiota, but few studies have investigated the effects of whole-grain cereals, which contain a variety of fiber types and other bioactive compounds. The aim of the present study was to compare the effects of diets containing whole-grain rye (RYE), oats (OAT) and wheat (WHE) on fecal microbiota and short-chain fatty acid production. Eighteen dogs were fed three experimental diets, each for four weeks, in a cross-over design. Fecal samples were collected at the end of each diet period. Analysis of 16S rRNA gene amplicons showed that familyLachnospiraceaeand genusBacteroideswere the gut microbial groups most affected by diet, with lowest relative abundance following consumption of RYE and a trend for a corresponding increase in genusPrevotella_9. Fecal acetate and propionate concentrations were higher after consumption of RYE compared with OAT. In conclusion, rye had the strongest effect on gut microbiota and short-chain fatty acids, although the implications for dog gut health are not yet elucidated.