The steady perturbation caused in a longshore flow by a bottom undulation is considered. The bedforms are assumed to be alongshore periodic, with crests in the cross‐shore direction and with a small amplitude in order for linear theory to be applicable. The inviscid shallow‐water equations are considered in order to investigate topographic resonance, that is, the condition under which the perturbation in the flow reaches a maximum. Since upstream edge waves held stationary by the mean flow are solutions to the homogeneous resonance equations, the existence of such flows gives rise to the existence of resonances of infinite amplitude (linear, inviscid theory). For a maximum local Froude number of the basic flow F of less than 1, the flow is found to behave subcritically according to classic channel flow theory. In addition, neither steady edge waves nor infinite amplitude resonances exist in this case. However, by numerical simulation, a finite maximum in the flow perturbation as a function of bedform wavelength is found. This topographic resonance is rather weak and wide banded. For a bedform height of 1% the local water depth, the perturbation on the flow may typically be 4% of the mean current. The resonant wavelength is between two and three times the distance of the peak longshore current to the shoreline, lV, when the current profile has a maximum at some distance offshore, or nearly four times the cross‐shore length scale of the sandbars, l, for a flow profile monotonically increasing to a constant current far offshore. For F≳1 resonances of infinite amplitude are found. For every F, lV, and l, there is an infinite set of resonant modes with an increasing cross‐shore complexity when the mode number increases, similarly to edge waves. The resonant wavelength increases with F and with lV. Some implications on the growth of transverse sandbar families and cuspidal coast are discussed.