본문으로 건너뛰기
블로그

Google Sites on Cloudflare: pages missing? Use DNS only

Google Sites on a Cloudflare domain showing "Invalid DNS" or a broken pages menu? Set the ghs.googlehosted.com CNAME to DNS only (grey cloud), then re-check.

The Liite team7분 분량

Short answer

In Cloudflare, open DNS > Records, find the CNAME that points your www name to ghs.googlehosted.com, and switch it from Proxied (orange cloud) to DNS only (grey cloud). Save, wait a few minutes, then run the custom-domain check in Google Sites again. People who hit this report that it fixed the problem, but it is not the only possible cause.

You pointed your domain at a Google Site and the DNS lives on Cloudflare. Now the site loads wrong or not at all: the pages menu is missing, the page looks half-built, or Google Sites says the DNS is invalid. The search people use for this is google sites cloudflare proxy not working.

Why it happens

Google's setup needs your hostname to resolve to Google. Google's help for mapping a URL to a site tells you to set the CNAME destination to ghs.googlehosted.com, and its troubleshooting table lists "Invalid DNS" as the error when that record isn't right.

A proxied Cloudflare record changes what the world sees. Cloudflare's proxy status docs explain that a DNS query for a proxied record is answered with Cloudflare's own IP addresses instead of the real target. So anything checking your domain, including Google, sees Cloudflare rather than a CNAME to ghs.googlehosted.com. Cloudflare also lists SaaS-hosted websites among the things that should usually be DNS only.

That is the most plausible cause of the "DNS failed" check. The missing pages menu is less clear. People on Google's and Cloudflare's community forums report that turning the proxy off fixed it, but neither vendor documents that exact symptom, so treat the proxy as the likeliest cause, not a certain one.

Other causes show up often enough to rule out:

  • A leftover record or registrar forwarding on the same name.
  • A www CNAME that points back to the root domain instead of Google.
  • Editing DNS at the registrar while the nameservers actually point to Cloudflare.
  • The site not being set to public and published.
  • A CAA record that blocks certificate issuance.

Step-by-step fixes

Fix 1: Turn the proxy off for the Google Sites record

  1. Log in to Cloudflare and open your domain.
  2. Go to DNS > Records.
  3. Find the CNAME for the Google Site. It is normally www (or another subdomain) pointing to ghs.googlehosted.com.
  4. If the cloud next to it is orange, click Edit.
  5. Set Proxy status to DNS only so the cloud turns grey, then Save.
  6. Wait a few minutes. DNS changes can take longer in some places, so give it up to an hour before judging.
  7. In Google Sites, open Settings > Custom domains and run the check again.
  8. Open the site in a private window to avoid cached results.

If the record is missing, add it fresh with the proxy off from the start:

Type: CNAME
Name: www
Target: ghs.googlehosted.com
Proxy status: DNS only

Name format

Use the target exactly as ghs.googlehosted.com, with no extra characters. Squarespace's help for the same Google Sites setup stresses this when Google reports "Invalid DNS".

Fix 2: Clean up conflicting records

  1. In Cloudflare DNS > Records, search for the name you use (for example www).
  2. Delete any other CNAME or A record on the same name.
  3. Check the www CNAME doesn't point at your bare domain. Google's community answers say it must point to ghs.googlehosted.com.
  4. Remove any forwarding or redirect rule at your registrar for that name.

Fix 3: Make sure you are editing the right DNS

If your nameservers point to Cloudflare, only Cloudflare's DNS page counts. Records you add at the registrar are ignored. Check the nameservers at your registrar and make your edits where they point.

Fix 4: Check the Google side

  1. Confirm the site is Published and visible to the public.
  2. Confirm the domain is added under the site's custom domain settings, in the same Google account that owns the site.
  3. For a Workspace site, the mapping is done in the Admin console under Apps > Google Workspace > Sites, as Google's help describes.
  4. If Google says the certificate is missing, Google's troubleshooting table suggests deleting and re-creating the address mapping.

Fix 5: Check CAA records

Google lists CAA support as one cause of "Invalid DNS". If you have CAA records in Cloudflare, make sure none blocks Let's Encrypt, or add one that allows it.

Which symptom points to which cause

SymptomLikely causeFix
"Invalid DNS" in Google SitesCNAME proxied, wrong, or missingFix 1
Pages menu missing, site half-renderedProxy on (reported, not documented)Fix 1
Works on www, not on the bare domainRoot has no CNAME or forwardingForward root to www
Still wrong after an hourDuplicate record or forwardingFix 2
Edits have no effectEdited at the wrong DNS hostFix 3
Site shows a 404 or is not foundNot published or not publicFix 4

Checklist before you try again

  • The CNAME target is ghs.googlehosted.com.
  • The cloud on that record is grey (DNS only).
  • Only one record exists for that name.
  • No registrar forwarding is active for that name.
  • You edited DNS where the nameservers actually point.
  • The Google Site is published and public.
  • You waited at least a few minutes and tested in a private window.

Check what the world sees

Run dig CNAME www.yourdomain.com +short. If it returns ghs.googlehosted.com, the proxy is off. If you get Cloudflare IP addresses, it is still on.

What won't help

  • Waiting with the proxy still on. Time doesn't change how Cloudflare answers for a proxied record.
  • Clearing the browser cache alone. The problem is in DNS, not your browser.
  • Adding extra records "just in case". Duplicates create new conflicts.
  • Pointing the bare domain at a CNAME by hand. Many DNS setups restrict this at the root. Forward the root to www, or follow Google's current steps for a root domain.

If nothing works

Contact Google Sites support through the Sites Help Center, or Cloudflare support if the record won't save or doesn't change. Include your domain, the exact error text, a screenshot of the DNS record row showing its proxy status, the output of the dig command above, and what you've already tried.

Subject: Google Sites custom domain shows "Invalid DNS" (Cloudflare DNS)

My domain: www.example.com
Site URL: sites.google.com/view/...
DNS host: Cloudflare (nameservers: ...)

The CNAME for www points to ghs.googlehosted.com with proxy status
DNS only. There are no other records on this name and no registrar
forwarding. Google Sites still shows "Invalid DNS" / the pages menu
is missing.

Result of `dig CNAME www.example.com +short`: ...
Time of last DNS change: ...
Please tell me what else to check.

If you'd rather rebuild elsewhere

Liite can serve a site on your own domain (Pro and up, one domain per site), using an A record for the apex or a CNAME for a subdomain. See the custom domains docs. It doesn't import from Google Sites, so you would rebuild the pages; the Pages docs show what you can build.

Common questions

Do I need to change my other Cloudflare records?

No. Proxy status is set per record. Only the record for the Google Site needs to be grey. Cloudflare's docs note that TXT and MX records are always DNS only anyway.

Can I keep the proxy on and make it work?

We found no confirmed way. Cloudflare's docs list SaaS-hosted websites as a case for DNS only, and the reports we found ended with DNS only. Turning the proxy off means caching and protection from Cloudflare no longer apply to that hostname.

Why does the bare domain still fail?

The Google Site has to be connected to a subdomain such as www. Google's community answers suggest forwarding the root domain to www once www works. Google Sites guides from hosts like Hostinger also describe adding Google A records for the root, so follow your current Google instructions.

Does it matter that Google's help is old?

Some of Google's pages show no recent update date, and its steps can change. Follow the instructions Google Sites shows you in Custom domains if they differ from this article.