Pages custom domain only - still no solution?

I’ve read through several past discussions on this, curious if there is a best or updated approach to achieve the following:

Pages site with custom domain, and without the <project> domain being active.

I tried locking the <project> behind Access (per another post) as I did with deployments, but that causes an error attempting to reach the custom domain.

Currently have an inelegant javascript window.location check to force <project> to the custom domain, but would rather it not be reachable at all.

Is there any further or better configuration to achieve this, or am I better off deploying as a worker instead?


It is not possible to completely disable the subdomain like you can with your subdomain, but you can use Bulk Redirects to prevent anyone from accessing your site through This cannot be bypassed like window.location.

Feel free to ask if you’re having trouble setting this up :slightly_smiling_face:


A post was split to a new topic: How to make new topic

Thank you, @albert! I guess I missed that thread and your answer.
I definitely prefer this approach to what I had. Worked perfectly. Cheers!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.