Surface interactions are responsible for many properties of condensed matter, ranging from crystal faceting to the kinetics of phase transitions. Usually, these interactions are polar along the normal to the interface and apolar within the interface. Here we demonstrate that polar in-plane surface interactions of a ferroelectric nematic NF produce polar monodomains in micron-thin planar cells and stripes of an alternating electric polarization, separated by $${180}^{{{{{{\rm{o}}}}}}}$$
180
o
domain walls, in thicker slabs. The surface polarity binds together pairs of these walls, yielding a total polarization rotation by $${360}^{{{{{{\rm{o}}}}}}}$$
360
o
. The polar contribution to the total surface anchoring strength is on the order of 10%. The domain walls involve splay, bend, and twist of the polarization. The structure suggests that the splay elastic constant is larger than the bend modulus. The $${360}^{{{{{{\rm{o}}}}}}}$$
360
o
pairs resemble domain walls in cosmology models with biased vacuums and ferromagnets in an external magnetic field.