We consider a version of the fractional Sobolev inequality in domains and study whether the best constant in this inequality is attained. For the half-space and a large class of bounded domains we show that a minimizer exists, which is in contrast to the classical Sobolev inequalities in domains.