In this article, the phenomenon of band gaps and Anderson localization of water waves over one-dimensional periodic and random bottoms is investigated by the transfer matrix method. The results indicate that the range of localization in random bottoms can