Understanding rumen microbial ecology is essential for the development of feed systems designed to improve livestock productivity, health and for methane mitigation strategies from cattle. Although rumen microbial communities have been studied previously, few studies have applied next-generation sequencing technologies to that ecosystem. The aim of this study was to characterize changes in microbial community structure arising from feeding dairy cows two widely used diets: pasture and total mixed ration (TMR). Bacterial, archaeal and protozoal communities were characterized by terminal restriction fragment length polymorphism of the amplified SSU rRNA gene and statistical analysis showed that bacterial and archaeal communities were significantly affected by diet, whereas no effect was observed for the protozoal community. Deep amplicon sequencing of the 16S rRNA gene revealed significant differences in the bacterial communities between the diets and between rumen solid and liquid content. At the family level, some important groups of rumen bacteria were clearly associated with specific diets, including the higher abundance of the Fibrobacteraceae in TMR solid samples and members of the propionate-producing Veillonelaceae in pasture samples. This study will be relevant to the study of rumen microbial ecology and livestock feed management.