# Persistent DNS Resolution Errors

**URL:** <https://discuss.huggingface.co/t/persistent-dns-resolution-errors/153827>\
**Category:** Spaces\
**Created:** [May 6, 2025, 10:58pm UTC](https://discuss.huggingface.co/t/persistent-dns-resolution-errors/153827 "2025-05-06T22:58:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![IanStedham](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@IanStedham](https://discuss.huggingface.co/u/IanStedham)\
**Post date:** [May 6, 2025, 10:58pm UTC](https://discuss.huggingface.co/t/persistent-dns-resolution-errors/153827/1 "2025-05-06T22:58:02Z")

</div>

Hello,

I’m experiencing persistent DNS resolution errors when trying to access `https://api-inference.huggingface.co` from within my Space.

My space is running on Nvidia 1xL4 hardware and I am receiving this error no matter which text-generation model I use: requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘[api-inference.huggingface.co](http://api-inference.huggingface.co)’, port=443): Max retries exceeded with url: … (Caused by NameResolutionError: Failed to resolve ‘[api-inference.huggingface.co](http://api-inference.huggingface.co)’ ([Errno -2] Name or service not known))

I’ve verified that:

- `requests.get("https://www.google.com")` works from the same Space
- The domain resolves externally (confirmed via nslookup and curl on my local machine)
- Changing hardware tiers does not resolve the issue

It appears to be a DNS or routing misconfiguration inside the Space environment. Is there anyway I can fix this or try to resolve this? If there is anymore information I can provide please let me know.

Thank you very much

---

_[View the full topic](https://discuss.huggingface.co/t/persistent-dns-resolution-errors/153827)._
