How to disconnect custom domain from a page?

I started getting 522 for my connected page without any changes on my side. I wanted to delete the page project but I cannot do that because it is connected to a custom domain, but there is no way I can see to delete the custom domain.