The well-known proof of Beurling’s Theorem in the Hardy space
$H^2$, which describes all shift-invariant subspaces, rests on calculating the orthogonal projection of the unit constant function onto the subspace in question. Extensions to other Hardy spaces
$H^p$ for
$0 < p < \infty $ are usually obtained by reduction to the
$H^2$ case via inner–outer factorization of
$H^p$ functions. In this article, we instead explicitly calculate the metric projection of the unit constant function onto a shift-invariant subspace of the Hardy space
$H^p$ when
$1<p<\infty $. This problem is equivalent to finding the best approximation in
$H^p$ of the conjugate of an inner function. In
$H^2$, this approximation is always a constant, but in
$H^p$, when
$p\neq 2$, this approximation turns out to be zero or a non-constant outer function. Further, we determine the exact distance between the unit constant and any shift-invariant subspace and propose some open problems. Our results use the notion of Birkhoff–James orthogonality and Pythagorean inequalities, along with an associated dual extremal problem, which leads to some interesting inequalities. Further consequences shed light on the lattice of shift-invariant subspaces of
$H^p$, as well as the behavior of the zeros of optimal polynomial approximants in
$H^p$.