DNS when hosting a static website on Google Cloud Platform bucket

Vladimir Markiev

Sorry if my question may seem messy I have only a basic idea about DNS or hosting. The story is the following:

I have created a couple of my personal webpages and registered a domain. Then I found out that I don't need a "big" hosting for my couple of pages and it's better to host a website in the cloud, I chose GCP for hosting, found this tutorial and followed through to successfully achieve my goal of hosting a static website.

Then I wanted to share a link to my website in social media and found out that Open Graph Protocol meta information I've added to my website is not displaying while the site is working ok. Strange thing, I thought and started searching. I found Facebook debugger tool and used it to check my website only to see the "Could not resolve the hostname into a valid IP address." response.

I searched for more information about that issue and found a StackOverflow question, where it's said something about domain, hosting, and DNS. Basically, I figured out that DNS servers in my domain registrar's panel are configured for the registrar's hosting while I use GCP for hosting. And I need those DNS servers to match for OGP meta info to work properly.

Any research that I dis, lead me to GCP DNS. But I'm not sure that configuring GCP DNS (which is not GCP bucket storage that I use for hosting my static website) is a good idea or the right way to solve my issue.

Do I need to configure GCP DNS, create VM, and host my website there? Or do I need to specify some special GCP DNS servers in my domain registrar's control panel? Or do I need to do something else?

Please, point me in the right direction. I need my website not just to be available on the internet as a hyperlink, I want the OGP metadata to be available and visible when sharing the link in social media. I don't mind if my website will be hosted on a bucket or on VM of GCP DNS, I just want to understand in what direction I should dig.

Details: My domain is http://www.vladimir-markiev.name/. I followed every step of GCP tutorial exactly as described in documentation: enabled billing, verified domain ownership, configured CNAME record at domain registrar's DNS to www. vladimir-markiev.name (that www. in the beginning irritates me a little, maybe I'll try to deal with it later). I managed access to my bucket to "public and can be accessed by anyone on the internet". I can add my own list of DNS servers to my domain - the registrar allows to do that.

Update: Somehow CNAME record was missing from my domain. I configured it to point to GCP. Check successful.

I also ran a DNS check and it gave out some issues:

enter image description here CNAME www → c.storage.googleapis.com.

But the issue persists.

Ask me any additional questions for clarification, I tried to include as much information as possible but could have missed something

Serhii Rohoza

When I checked DNS records for your domain first time I found that you misconfigured CNAME record:

$ dig CNAME www.vladimir-markiev.name

; <<>> DiG 9.11.5-P4-5.1-Debian <<>> CNAME www.vladimir-markiev.name
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 60848
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.vladimir-markiev.name.     IN      CNAME

;; AUTHORITY SECTION:
vladimir-markiev.name.  600     IN      SOA     ns1.reg.ru. hostmaster.ns1.reg.ru. 1588872137 14400 3600 604800 10800

;; Query time: 105 msec
;; SERVER: 100.115.92.193#53(100.115.92.193)
;; WHEN: Fri May 08 14:44:35 CEST 2020
;; MSG SIZE  rcvd: 111

To solve your issue you should go back to the domain registrar side and fix DNS zone configuration.

As I can see at the screenshot of MXToolbox you did all the necessary changes and site is accessible for me. Have a look at some checks below:

CNAME record is configured properly:

$ dig CNAME www.vladimir-markiev.name

; <<>> DiG 9.11.5-P4-5.1-Debian <<>> CNAME www.vladimir-markiev.name
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12444
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.vladimir-markiev.name.     IN      CNAME

;; ANSWER SECTION:
www.vladimir-markiev.name. 85906 IN     CNAME   c.storage.googleapis.com.

;; Query time: 18 msec
;; SERVER: 100.115.92.193#53(100.115.92.193)
;; WHEN: Fri May 08 15:42:51 CEST 2020
;; MSG SIZE  rcvd: 92

$ host www.vladimir-markiev.name
www.vladimir-markiev.name is an alias for c.storage.googleapis.com.
c.storage.googleapis.com has address 216.58.215.80
c.storage.googleapis.com has IPv6 address 2a00:1450:401b:806::2010

and you site is reachable via browser and curl:

$ curl -I  www.vladimir-markiev.name 
HTTP/1.1 200 OK
X-GUploader-UploadID: AAANsUnbpBaaL4YoepXEs5QRGjeVIkR94Eywdtot02oL3xOPcPRYP6KyPUmf5q_b140hLBhutYQsYbuCglL8nvU2oQ
Expires: Fri, 08 May 2020 14:34:23 GMT
Date: Fri, 08 May 2020 13:34:23 GMT
Last-Modified: Fri, 08 May 2020 12:14:02 GMT
ETag: "53d6f21bb90302f77b655904dd5f4e4d"
x-goog-generation: 1588940042495901
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 19830
Content-Type: text/html
x-goog-hash: crc32c=ziXBHQ==
x-goog-hash: md5=U9byG7kDAvd7ZVkE3V9OTQ==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Length: 19830
Server: UploadServer
Cache-Control: public, max-age=3600
Age: 958 

$ curl  www.vladimir-markiev.name | head 
...
<!DOCTYPE html>
<html lang="ru">

<head prefix="og: http://ogp.me/ns#">
    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html">
    <title>Главная страница - Владимир Маркиев</title>
    <link rel="stylesheet" href="style.css">
    <meta name="robots" content="follow, index" />
    <meta name="description" content="Владимир Маркиев, Vladimir Markiev: Технический писатель в Санкт-Петербурге сайт-визитка." />
 67 19830   67 13395    0     0  12.7M      0 --:--:-- --:--:-- --:--:-- 12.7M
curl: (23) Failed writing body (429 != 5632)

If you still not able to open your website in browser you should wait for a while because of DNS propagation time ( changes usually take 24 to 48 hours).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Creating a bucket using Google Cloud Platform Deployment Manager Template

From Dev

"Access denied: Anonymous users does not have storage.objects.list access to bucket" when trying to host a static website from a Google Bucket

From Dev

How to get the DNS name of a service in google cloud platform?

From Dev

Cloud Functions Static File Generator for Hosting Website

From Dev

Walking a directory tree inside a Google Cloud Platform bucket in Python

From Dev

How to host a static website on google cloud storage?

From Dev

Setting Google Cloud Platform Log sink to a specific folder within a bucket

From Dev

Google Cloud Platform Bucket SSL Settings

From Dev

How to access Google Cloud Storage Bucket from AI Platform job

From Dev

S3 Bucket Endpoint for Static Website Hosting

From Dev

Deploy static website to Google Cloud made with Gatsby

From Dev

Terraform google bucket for static website for google storage - 403

From Dev

If I configure a s3 bucket for static website hosting, then can I upload assets to it through API?

From Dev

Does domain name needs to match with s3 bucket for static website hosting?

From Dev

DNS_PROBE_FINISHED_NXDOMAIN with hosting static website with Google Cloud Platform

From Dev

Is there a way to backup contents of VM in Google cloud platform to a specific bucket?

From Dev

Verifying DNS TXT record (using Advanced setup mode) from godaddy while configuring firebase hosting for static website

From Dev

Google Cloud Platform - How to upload image file into google cloud storage bucket?

From Dev

Google Cloud Platform Bucket: serving content with custom domain over https

From Dev

Static Website hosting with Staging in AWS

From Dev

Moving Drupal website to Google Cloud Platform

From Dev

Error when storing checkpoints to Google Cloud bucket

From Dev

google cloud platform load balancer dns amd DNSSEC not working in US

From Dev

Creating a DNS forward in Google Cloud Platform with Bind9

From Dev

Cloud Hosting platform selection

From Dev

Google cloud bucket use for static services without having a domain

From Dev

Unable to make a object public in bucket in Google Cloud Platform

From Dev

How do you get the Bucket website endpoint for an S3 bucket setup for static hosting?

From Dev

How do you get the Bucket website endpoint for an S3 bucket setup for static hosting?

Related Related

  1. 1

    Creating a bucket using Google Cloud Platform Deployment Manager Template

  2. 2

    "Access denied: Anonymous users does not have storage.objects.list access to bucket" when trying to host a static website from a Google Bucket

  3. 3

    How to get the DNS name of a service in google cloud platform?

  4. 4

    Cloud Functions Static File Generator for Hosting Website

  5. 5

    Walking a directory tree inside a Google Cloud Platform bucket in Python

  6. 6

    How to host a static website on google cloud storage?

  7. 7

    Setting Google Cloud Platform Log sink to a specific folder within a bucket

  8. 8

    Google Cloud Platform Bucket SSL Settings

  9. 9

    How to access Google Cloud Storage Bucket from AI Platform job

  10. 10

    S3 Bucket Endpoint for Static Website Hosting

  11. 11

    Deploy static website to Google Cloud made with Gatsby

  12. 12

    Terraform google bucket for static website for google storage - 403

  13. 13

    If I configure a s3 bucket for static website hosting, then can I upload assets to it through API?

  14. 14

    Does domain name needs to match with s3 bucket for static website hosting?

  15. 15

    DNS_PROBE_FINISHED_NXDOMAIN with hosting static website with Google Cloud Platform

  16. 16

    Is there a way to backup contents of VM in Google cloud platform to a specific bucket?

  17. 17

    Verifying DNS TXT record (using Advanced setup mode) from godaddy while configuring firebase hosting for static website

  18. 18

    Google Cloud Platform - How to upload image file into google cloud storage bucket?

  19. 19

    Google Cloud Platform Bucket: serving content with custom domain over https

  20. 20

    Static Website hosting with Staging in AWS

  21. 21

    Moving Drupal website to Google Cloud Platform

  22. 22

    Error when storing checkpoints to Google Cloud bucket

  23. 23

    google cloud platform load balancer dns amd DNSSEC not working in US

  24. 24

    Creating a DNS forward in Google Cloud Platform with Bind9

  25. 25

    Cloud Hosting platform selection

  26. 26

    Google cloud bucket use for static services without having a domain

  27. 27

    Unable to make a object public in bucket in Google Cloud Platform

  28. 28

    How do you get the Bucket website endpoint for an S3 bucket setup for static hosting?

  29. 29

    How do you get the Bucket website endpoint for an S3 bucket setup for static hosting?

HotTag

Archive