Homophily is a strong determinant of many types of human relationships. It affects, for example, whom we marry and potentially also whom we vote for. We use data on preferential voting from Czech parliamentary elections in 2006, 2010, 2013, and 2017 matched with 2011 Census data to identify the effect of homophily on voting behavior. We find that a one percent increase in the share of the municipality's population that has the same occupation or education level as the candidate increases the number of preferential votes that candidate receives by 0.7% or 0.5%, respectively. We also find that candidates who live in the voters' municipality receive a substantially higher number of preferential votes.