0

So I have a website hosted on Google Cloud and I bought the domain name from GoDaddy, the www.blakemining.com version of the website works just fine however if you type in blakemining.com, it doesnt work. I called GoDaddy and they said that I need to set my A record to the IP address of the website in order to have that working. How do I get the IP address of my website? I tried a few things that I found online but none of them seem to have given me the right IP address.

This is what I have added to the records set on top of whats there by default

blakemining.com. A 300 172.217.4.144

www.blakemining.com. CNAME 300 c.storage.googleapis.com.

3 Answers3

1

Your Cloud Storage Bucket needs to be named "www.blakemining.com" as per the GCS static website documentation. You actually just need the CNAME record.

Notauser
  • 406
  • 2
  • 10
  • 1
    I already did that and the www version of the website works. I looked into it more and I have to run some sort of VM on Google Cloud that will redirect non www requests to the www one apparently? –  Dec 06 '18 at 21:26
  • Glad to know it helped. It looks like you would need a DNS provider that supports ANAME/ALIAS type records as per this post[1] https://stackoverflow.com/a/35739430/6549463 – Notauser Dec 07 '18 at 18:18
0

Do you have your website service running from a VM instance at Compute Engine ? if is like this use the command below:

gcloud compute instances describe <instance-name> --zone=<your-instance-zone> | grep -i natip

Command above will show you your external IP

Are you using the Cloud DNS ?

I can not add comments yet :)

J.Rojas
  • 302
  • 2
  • 7
  • I am running a static website with Cloud Storage and yes, I am using Cloud DNS. –  Nov 28 '18 at 22:48
0

After reviewing your case description, it seems to me it’s not the issue of setting the A record to the IP address, it seems like a redirect issue about your naked domain (Non-WWW) is not forwarding to your actual domain (with WWW)

To fix this, follow the steps below:

1.Login to your Go Daddy account

  1. Then go to the DNS management of your domain, by clicking ‘Manage,’ then click ‘Manage DNS.’

  2. Check Forwarding and Subdomain > click ‘Add a subdomain.’

4.And a subdomain, write your domain name without the www ( means your naked domain)

  1. And in ‘forward to’ write your domain name here with www ( your actual full domain)

  2. Select forward type to ‘ permanent 301.’

  3. And in settings choose forward only

  4. And save your setting

  5. Wait for 30 mins for your record to get updated, and you will see that your domain will be working without www means your naked domain will work.

If it still not working, then check this [document] on how to configure a Cloud Storage bucket to host a static website for a domain you own.