Could not connect to Google Apps Script: Could not resolve host: script.google.com
Other Information
Hello Support Team,
My website is hosted on InfinityFree. I am trying to connect my PHP website to a deployed Google Apps Script Web App using PHP cURL.
The Google Apps Script URL works when opened directly in my browser and returns a successful JSON response. However, the PHP website cannot connect and reports: “Could not resolve host: script.google.com”.
Please check whether my hosting server can resolve script.google.com through DNS and make outbound HTTPS requests using PHP cURL.
Please let me know if any hosting restriction or configuration is causing this issue.
Welcome to the InfinityFree community forum! Good to have you here.
Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
Solving an issue is a joint effort. Try the suggestions you get and report back what happened.
Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.
Google Apps Script is blocked on our free hosting, so this connection won’t work from your site. The hostname isn’t misspelled, so this isn’t a typo or a DNS fault on your side.
The article on outbound connections lists Google Apps Script as a service that is blocked entirely because of abuse, even on the allowed ports. Blocked services may not resolve at all, which is why you see this error:
Could not resolve host: script.google.com
The article says that if the service is on the blocked list, you’ll need a different hosting provider to use it. Opening the URL in your own browser works because the block only applies to connections made from our servers.
Here is the article, including the list of blocked services and the other outbound limits:
Someone else hit the same error with script.google.com recently, in this topic: