Troubleshooting of curl errors: Difference between revisions

Jump to navigation Jump to search
How to trace cUrl error (6) Could not resolve host
(How to trace cUrl error (6) Could not resolve host)
Line 82: Line 82:


If you're unsure whether encoding is needed, you can use an online URL encoder tool for conversion e.g. [https://www.urlencoder.org/ URL Encode and Decode - Online].
If you're unsure whether encoding is needed, you can use an online URL encoder tool for conversion e.g. [https://www.urlencoder.org/ URL Encode and Decode - Online].
=== How to trace cUrl error (6) Could not resolve host ===
This DNS resolution error indicates the hostname doesn't exist. Here are the 3 key debugging steps:
1. Verify the main domain exists
<pre>
curl -i https://example.com
</pre>
2. Check subdomain DNS resolution
<pre>
nslookup subdomain.example.com
</pre>
3. Test correct URL structure
<pre>
# Maybe it's a path instead of subdomain
curl -i "https://www.example.com/subdomain/..."
# Or try common subdomain alternatives 
nslookup www.example.com
nslookup api.example.com
</pre>
Conclusion: If you get {{kbd | key=NXDOMAIN}}, the subdomain doesn't exist - verify the correct URL from your source.


=== How to resolve cUrl error (#5): Unsupported proxy syntax ===
=== How to resolve cUrl error (#5): Unsupported proxy syntax ===

Navigation menu