We consider a Cahn–Hilliard equation which is the conserved gradient flow of a nonlocal total free energy functional. This functional is characterized by a Helmholtz free energy density, which can be of logarithmic type. Moreover, the spatial interactions between the different phases are modeled by a singular kernel. As a consequence, the chemical potential \(\mu \) contains an integral operator acting on the concentration difference \(c\), instead of the usual Laplace operator. We analyze the equation on a bounded domain subject to no-flux boundary condition for \(\mu \) and by assuming constant mobility. We first establish the existence and uniqueness of a weak solution and some regularity properties. These results allow us to define a dissipative dynamical system on a suitable phase–space, and we prove that such a system has a (connected) global attractor. Finally, we show that a Neumann-like boundary condition can be recovered for \(c\), provided that it is supposed to be regular enough.