A new model of genotypic-specific habitat selection is proposed in which habitats are given a biologically meaningful way with differences in the frequency of various niches. Conditions for polymorphism are quite robust even for small viability differences. A method to estimate habitat selection parameters from information on habitat preference is given. Even when habitat preference is not great, it may have a large effect on maintaining polymorphism.