An ophthalmologic apparatus includes a tomographic image acquisition unit configured to acquire a tomographic image of a subjects eye based on a combined beam obtained by combining a return beam from the subjects eye, which is irradiated with a measuring beam, and a reference beam corresponding to the measuring beam, an optical path length difference changing unit configured to change an optical path length difference between the measuring beam and the reference beam, and a control unit configured to, in a case where relative positions of an optical system for irradiating the subjects eye with the measuring beam and an anterior segment of the subjects eye satisfy a predetermined condition based on an image of the anterior segment, control the optical path length difference changing unit so that the optical path length difference is within a predetermined range.