I am experiencing issues when trying to set up subdomains for my website using Google Cloud DNS and GoDaddy. I have configured two subdomains, www and api, to point to a Cloud Run instance and an API Gateway respectively. Despite following the configuration steps, I encounter SSL certificate errors and 404 pages when trying to access the subdomains. The domain name is munimentum.eu. The subdomain I tried to add is “api” & “www” FYI.
- GoDaddy Configuration:
• Subdomain www: Added a CNAME pointing to a Cloud Run instance (munimentum-website-xdpksu3ipa-ew.a.run.app).
• Subdomain api: Added a CNAME pointing to my API Gateway (global-api-config-v1-0-1-5lzyyet8.ew.gateway.dev).
2. Google Cloud Configuration:
• Cloud Run Service: Configured to handle requests at www.example.com.
• API Gateway: Configured with a path / that returns an HTML index from a public Cloud Function.
I expected the subdomains to be accessible with the correct SSL certificates and to serve the content configured in Cloud Run and the API Gateway. Instead, I encountered the following issues:
Issues Encountered
• SSL Certificate Error: When accessing the subdomains, I get a certificate warning (NET::ERR_CERT_COMMON_NAME_INVALID) in Chrome. The certificate’s common name is *.a.run.app.
• 404 Error: Proceeding past the SSL warning results in a 404 page with the message “The requested URL / was not found on this server.”
Questions
1. Is the problem coming from the fact that I am using CNAME records for the subdomains?
2. Should I set up a load balancer and assign IP addresses to the subdomains instead?
3. Are there any additional steps required to properly configure SSL certificates for the subdomains?
Any insights or solutions to resolve these issues would be greatly appreciated.
Butcat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.