I’ve enabled Custom Hostnames for my domain, and added a fallback domain which works correctly when accessed. When I add a new custom domain, and then point that custom domain to my main domain via a CNAME record, I get a “Invalid SSL Certificate” error when accessing the custom domain.
Any ideas what could be causing this? I’ve attached screenshots of the setup.
You can use the following command if you have curl available (download if not): curl -v https://customerdomain.com --connect-to ::actual-server-ip.
This will use your customers hostname but bypass the Cloudflare proxy to see the certificate that is actually served to Cloudflare.
Just replace customerdomain.com and actual-server-ip.
Thank you! Managed to find the issue now. Was an Ngnix config issue that was not handling wildcard server names correctly.
For anyone else encountering this while trying to use Laravel Forge to create a server with Cloudflare Custom Hostnames for Saas, you need to update this line in your Nginx config: