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>.pages.dev domain being active.

I tried locking the <project>.pages.dev 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>.pages.dev 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?

thanks

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

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

4 Likes

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.