Google Sites domain: "unexpectedly closed the connection"
Google Sites custom domain showing "unexpectedly closed the connection"? Check the www CNAME, certificate and CAA, then re-add the mapping. Plus a fallback.
The Liite team7 دقيقة قراءة
Short answer
This error usually means the HTTPS certificate for your custom domain isn't being served yet, or the DNS doesn't point where Google expects. Make sure the www hostname has a CNAME to ghs.googlehosted.com, remove conflicting records, then delete and re-add the custom URL in Google Sites so the certificate is issued again.
Your Google Sites page loads fine at its sites.google.com address, but your custom domain fails in the browser with this:
This site can't be reached… unexpectedly closed the connection
We don't have a single confirmed cause for this exact message. A thread on a community forum from December 2025 ended without a fix. One commenter there suggested that ghs.googlehosted.com doesn't serve SSL when reached as a bare host, and that Safari forces HTTPS. Google's own help pages do cover the likely culprits, and they are below.
Why it happens
"Closed the connection" on an HTTPS address generally means the secure handshake failed. For Google Sites, these are the causes Google and its community helpers point to, most common first.
- The mapping has no certificate. Google's Workspace help lists "Missing certificate" as a known error. Its fix is to delete and re-create the address mapping so the domain-validated certificates are supplied. Google Sites help gives the same fix for "This URL is missing its certificate": delete your custom URL and assign it again.
- The CNAME is wrong or missing. Google lists a CNAME record that wasn't updated at your domain host as one cause of "Invalid DNS". Community helpers also report seeing
wwwpointing back at the root domain instead of Google. - The domain is on the bare root. Google says your URL must include a subdomain, like "www". A bare
yourdomain.comisn't a valid mapping on its own. - CAA records block issuance. Google says an Invalid DNS error can come from a DNS provider that lacks proper CAA support, or a CAA record set to prevent issuance by Let's Encrypt.
- Certificate issuance is still in progress. A community helper notes that after the DNS is right, it can take another few minutes while Google sets up the SSL certificate behind the scenes.
- Forwarding or proxying in front. A community answer says you need to remove other CNAME records and any forwarding in your domain configuration.
Google doesn't publish a page tying these causes to this exact browser message, so treat the list as things to rule out one by one.
Step-by-step fixes
1. Test the right hostname
- Open
https://www.yourdomain.com, not the bareyourdomain.com. - If
wwwworks and the bare domain fails, the mapping is fine. The bare domain needs a forward or separate setup, covered in fix 5.
2. Check the CNAME at your DNS host
- Sign in where your DNS is actually managed. If your nameservers point at Cloudflare, Route 53 or a web host, edit DNS there, not at the registrar.
- Find the CNAME with host
www. - Set its destination to
ghs.googlehosted.com. Squarespace's guide says the value needs no extra characters. - Check what the world sees. Run this with your own hostname:
nslookup -type=CNAME www.yourdomain.comThe answer should be ghs.googlehosted.com.
3. Remove conflicting records and forwarding
- Delete any other record on the
wwwhost: A, AAAA or a second CNAME. - Remove domain forwarding or "URL redirect" rules for
www. - If your DNS provider has a proxy or CDN toggle (orange cloud and similar), set that record to DNS only while testing.
4. Check CAA records
- Look at your domain's DNS for CAA records. If you never added any, skip this step.
- If CAA exists, make sure it doesn't block Let's Encrypt, per Google's troubleshooting table.
- If your DNS provider doesn't support CAA properly, Google's suggested options are to contact them or switch DNS providers.
5. Delete and re-add the custom URL
For a personal Google account, open the site in new Google Sites, click Settings, go to Custom URLs, enter your custom URL and click Assign. Remove the existing entry first, save, then add it again. The current Sites interface may label this section differently: Squarespace's guide describes Settings > Custom domains in newer layouts. Use whichever your editor shows.
Google Workspace admins do this in the Admin console: Menu, Apps, Google Workspace, Sites. Then use the Add Custom URL flow.
6. Check sharing and publishing
A mapped URL only shows to outsiders if the site is public. People can only see the mapped URL if the site is shared with anyone outside your organization. Also make sure the site is published. This wouldn't normally give a closed connection, but it is a cheap check.
7. Wait, then test from another network
Google's help says that after you update DNS, wait 24-48 hours and try again when you still see Invalid DNS. Test on mobile data to rule out a stale DNS cache on your own router.
Cause, symptom and fix at a glance
| Cause | What you see | Fix |
|---|---|---|
| No certificate on the mapping | Connection closed on https:// | Delete and re-add the custom URL |
www CNAME missing or wrong | Invalid DNS, or another host's page | Point www to ghs.googlehosted.com |
| Conflicting records or forwarding | Wrong page, or intermittent failures | Delete extra records and forwards |
| CAA blocks issuance | Invalid DNS, no certificate | Allow Let's Encrypt or change DNS provider |
| Bare domain used | Works on www only | Use www, forward the root to it |
| Still propagating | Fails now, works later | Wait up to 24-48 hours |
Warning
Don't leave old A records or a forward on the same host "just in case". Extra records on the hostname are a common reason the mapping never gets its certificate.
Checklist before you try again
- The site is published and shared publicly.
www.yourdomain.comhas one CNAME toghs.googlehosted.com, and nothing else.- No forwarding or proxy sits on that host.
- You edited DNS at the provider that holds your nameservers.
- No CAA record blocks Let's Encrypt.
- The custom URL was deleted and re-assigned after the DNS was right.
- You waited and tested on another network.
If nothing works
Use the Google Sites Help Center, or the Sites community forum, and include your domain, your sites.google.com address, the exact error, when you last changed DNS, and the output of the nslookup command. People in Google's forum often ask for your domain name and the Google Site URL so they can run public DNS checks. If you manage the domain through Workspace, your admin can also raise it with Google Workspace support. Google's help article on mapping a new URL to a site has the full error table.
Subject: Custom domain on Google Sites closes the connection over HTTPS
My site works at https://sites.google.com/... but https://www.yourdomain.com
shows "This site can't be reached... unexpectedly closed the connection".
- www CNAME: ghs.googlehosted.com (confirmed with nslookup)
- No other records on www, no forwarding or proxy
- CAA records: none / allow Let's Encrypt
- Custom URL deleted and re-assigned on [date, time, timezone]
- Site is published and public
What else can I check on the certificate side?If you'd rather not deal with this again
If all you need is a simple page or small site on your own domain, Liite handles it in one place. On Pro and up you connect one custom domain per site and add the DNS records Liite shows: an A record for a bare domain, or a CNAME for a subdomain. When the status turns Active, the HTTPS certificate is set up automatically. You can enter the bare or www version, and the other redirects to it. Steps are in the custom domains docs, and you can sign up to try a page first. If the plan ends, the custom domain is disconnected and the site stays at its liite address.
Common questions
Does it work on http:// but not https://?
That points to the certificate rather than DNS: the domain reaches a server, but the secure setup isn't finished. Deleting and re-adding the custom URL is Google's suggested fix for a missing certificate.
Does my sites.google.com address still work?
In the reported case it did, so your content is fine. Only the domain mapping is broken.
How long should I wait?
Google's help says 24 to 48 hours for DNS changes that show Invalid DNS. If the DNS is clean and it still fails after that, re-add the mapping.
Can I use the bare domain without www?
Not directly. Google requires a subdomain such as www. Forward the root domain to www at your registrar, or add the root records that your provider's guide describes.