2

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

Vladimir Markiev
  • 263
  • 1
  • 13
  • **1**. Is it possible for you to share name of your domain. It'll be easier to troubleshoot DNS issues with it. **2**. Please update your question with your steps accordingly to the [documentation](https://cloud.google.com/storage/docs/hosting-static-website) like enabled billing, verified domain ownership, configured `CNAME` record at domain registrar's DNS (if you still use them). **3**. You're able to use any DNS you wan't for your website. – Serhii Rohoza May 08 '20 at 11:53
  • @SerhiiRohoza I've updated my question with more details. – Vladimir Markiev May 08 '20 at 12:10
  • Thanks! It looks like the cause of your issue is miscofigured `CNAME` record. Please update question with DNS zone configuration. You can check your `CNAME` record with online service like [MXToolbox](https://mxtoolbox.com/SuperTool.aspx?action=cname%3awww.vladimir-markiev.name&run=toolpage) – Serhii Rohoza May 08 '20 at 12:50
  • @SerhiiRohoza I configured it again and ran DNS check (screenshot attached). – Vladimir Markiev May 08 '20 at 13:13

1 Answers1

1

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).

Serhii Rohoza
  • 4,287
  • 2
  • 16
  • 29
  • I can see my site in the browser. Robots (API?) can't. Facebook debugger still says that it "Could not resolve the hostname into a valid IP address". But sure, I understand that it takes time. Let's wait and see. – Vladimir Markiev May 08 '20 at 14:06
  • Waited for two days and now it's working. Thank you. – Vladimir Markiev May 11 '20 at 07:21