  We study 1/2-BPS Wilson loop (WL) operators in maximally supersymmetric
Yang-Mills theory (MSYM) on $\mathbf{S}^5$. Their vacuum expectation value
(vev) can be computed exactly at large $N$ thanks to supersymmetric
localization. The holographic dual to MSYM on $\mathbf{S}^5$ is geometrically
realized by a stack of $N$ D4-branes with spherical worldvolume in ten
dimensions. We compute the vev of the circular WL using holography by
evaluating the partition function of a fundamental string in this background.
Our focus is on the next-to-leading order correction to the string partition
function which is composed of two parts; the dilaton coupling to the worldsheet
and the one-loop fluctuations of the worldsheet itself. We face a variety of
issues, some related to the presence of a non-constant dilaton, and others that
are common to its AdS analogue. However, the universality of UV divergences as
well as the importance of a proper choice of an IR regulator have been recently
stressed in the literature. Inspired by this, we resolve our issues by first
carefully treating the Weyl anomaly which receives contributions from the
non-constant dilaton, and then by computing the ratio of our partition function
and the one of a string in AdS$_4\times \mathbf{C}P^3$, which is dual to a
1/2-BPS WL in ABJM. Crucially, this approach yields a finite result which
matches the corresponding ratio of WL vevs on the gauge theory side.
