Custom domain on Pages always redirects to pages domain

I am serving a static website with Pages. Everything works perfectly except for the domain which is never displaying properly. I added a ‘custom domain’ in the Pages dashboard, the domain validated, DNS is in place, but whenever I navigate to the website it immediately redirects to the build url - for instance. It seems to be an internal redirect within Cloudflare’s system, even though all the configurations seem to be correct.