Predation is an important process in modern oceans and in the evolutionary history of marine ecosystems. Consequently, it has been hypothesized that shelled prey modified their ornamentation in response to predation. However, bivalve ornamentation has also been argued to be important in maintaining a stable life position in the sediment and in burrowing. To test whether concentric ribs were effective against drilling by carnivorous gastropods, we examined drill hole position and completeness for four Cenozoic bivalve species that differ in rib strength (Astarte radiata, A. goldfussi, Lirophora glyptocyma, and L. latilirata). The percentage of drill holes located between the ribs increases with increasing rib strength, whereas the percentage of drill holes on top of ribs decreases. This result suggests that gastropods select the drill hole site more effectively as rib strength increases, thereby saving time and energy, and that natural selection favors gastropods that select drill hole sites between ribs. Because of this greater stereotypy, the percentage of drill holes that are incomplete is generally lower in strongly ribbed species. The proportion of drill holes located on top of ribs is greater for incomplete than complete holes, implying that ribs can be effective against predators, but only when selected as the drilling location. We show that ribs are most effective against drilling predation for bivalves with moderately sized ribs, between which gastropods have difficulty siting drill holes. Concentric ribs are unlikely to have evolved as an adaptation against drilling predation because concentric ribs evolved in the Paleozoic and were already common in the Mesozoic, whereas drilling frequency increased later, in the Late Cretaceous–Paleogene. Moreover, rib strength of North American Astarte did not change through this time interval. Thus, the ribs considered here are a likely exaptation to drilling given their effectiveness at deterring drilling predation on bivalves with moderate ribs.