0

I have installed a LAMP on a VM on Compute Engine.

I want to redirect my domain to that VM, and for this I have created a DNS zone following Google's instructions. I have created the A and CNAME records.

My problem is that it doesn't work. Inspecting the domain in Google Admin Toolbox I can see that the A record points to the IP address of the Google Cloud VM, but the CNAME record shows Record not found!.

If I try to navigate to the domain it doesn't work. The LAMP installation is correct, because if I put the IP address of the VM I can see the Apache welcome page.

Do I need to do anything else to point my domain to my VM's IP in Google Cloud?

The domain was purchased at Google Domains, and there I have entered the DNS indicated by Google Console:

  • ns-cloud-b1.googledomains.com

  • ns-cloud-b2.googledomains.com

  • ns-cloud-b3.googledomains.com

  • ns-cloud-b4.googledomains.com

A. Cedano
  • 557
  • 7
  • 39
  • What is the domain name? For these types of problems, that information is required. Otherwise, all we can do is guess. – John Hanley Jul 05 '23 at 17:49
  • @JohnHanley the domain is `ioseph.app` – A. Cedano Jul 05 '23 at 18:01
  • The name servers match your post, the A record appears correct. Your site responds on HTTP with an `Apache2 Debian Default Page`. HTTPS is not configured for your server. There is no CNAME record. The TTL for your name server records is six hours. Did you wait for the changes to propagate? What is the content of the CNAME record? Note: test with browsers as a final step. When you have problems like this one they don't help. In your case, the browser automatically switches http to https and you don't have that configured yet. – John Hanley Jul 05 '23 at 18:11
  • Note: you do have a CNAME configured for `www.ioseph.app`. – John Hanley Jul 05 '23 at 18:31

1 Answers1

1

You are testing your site in a web browser. The browser is automatically redirecting your site from http to https. Otherwise, your site is working correctly.

The solution is to configure SSL on your web server and install an SSL certificate.

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • Thanks for your answer. I have created a Google managed SSL certificate. But it tells me that I have to create a load balancer so that the certificate goes from `PROVISIONING` to `ACTIVE`. But the documentation is very extensive and it is a totally unknown subject for me. You know what type of load balancer I should create for this case: a website that will work from Compute Engine directly. – A. Cedano Jul 05 '23 at 19:41
  • @A.Cedano - Google-managed certificates only work with Google-managed services such as a load balancer. If you do not want to add that service, then use Let's Encrypt and create your own self-managed certificate. You can also purchase a certificate from a certificate authority. – John Hanley Jul 05 '23 at 19:50