1

I have purchased a domain on https://www.namecheap.com/. I also have a Cloud Run service running on Google Cloud. I verified my domain on Google and I added it as a Custom Domain. In return Google gave me the DNS recordsdns Records

All I had to do was to go to NameCheap and add these records which I did. ipv4

ipv6

I can accces my site website like this https://abcd.com but not like this https://www.abcd.com with (WWW). Any ideea why?

Later Edit: here is the error enter image description here

CURL error: enter image description here

watsabitz
  • 68
  • 1
  • 8
  • What do you mean by "can't access"?, What errors do you get? – Matthew Apr 14 '22 at 14:15
  • Typically for cloud run you need to add both domains, www and non-www, in order for it to create the 2 ssl certs – Matthew Apr 14 '22 at 14:16
  • In the Webmaster Central (https://www.google.com/webmasters/verification) I cannot verifiy the domain twice (with WWW and without) because it says it's already verified. When I go to Clodu Run - Add Maping I see only one domain(without WWW). And the documenttion says the same, that I should verify my domain once and it will work with WWW and without. – watsabitz Apr 18 '22 at 06:55

1 Answers1

2

In order to have both the apex domain (abcd.com) as well as the www.abcd.com subdomain mapped to the same Cloud Run app you need to create both such mappings on the Cloud Run page.

domain mappings

You already have you apex domain mapped and the mapping produced a list of records you had to create with your DNS provider (A and AAAA records)

apex mapping

After creating this second mapping (www.abcd.com) Cloud Run will ask you create another (CNAME) DNS record (www.abcd.com -> ghs.googlehosted.com).

www. mapping

All together you have to have 8 A/AAAA records and 1 CNAME records with your DNS provider after you are done

dns records

After the CNAME record is created and verified, the certificate will be issued, and then you should be able to access your application with both apex and subdomain(s).

jabbson
  • 4,390
  • 1
  • 13
  • 23
  • I tried to verify my www.abcd.com domain but for some reason the domain is no verified. I used the same method that as when I verified abcd.com with TXT record from Webmaster Central. But now even after 2 hours is not working. – watsabitz Apr 22 '22 at 15:40
  • You don't need to separately verify www.abcf.com if you already have abcd.com verified. Instead when you are adding the mapping, choose the service and then your verified domain abcd.com and in the last field type www for subdomain. – jabbson Apr 22 '22 at 15:54
  • I managed to do it. My issue was that after I initialy added the main domain I remmoved the TXT record. As a result when I was clicking on "add mapping" Google was asking me to verify a domain again, hence the confusion. Ading the TXT back on the dns record and verifing the domain again fixed the issue. Thank you for you answers. – watsabitz Apr 24 '22 at 07:50