  We show that solutions of nonlinear nonlocal Fokker--Planck equations in a
bounded domain with no-flux boundary conditions can be approximated by Cauchy
problems with increasingly strong confining potentials defined in the whole
space. Two different approaches are analyzed, making crucial use of uniform
estimates for $L^2$ energy functionals and free energy (or entropy) functionals
respectively. In both cases, we prove that the weak formulation of the problem
in a bounded domain can be obtained as the weak formulation of a limit problem
in the whole space involving a suitably chosen sequence of large confining
potentials. The free energy approach extends to the case degenerate diffusion.
