# Hugging Face Support Request: DNS Resolution Issue in Spaces Environment

**URL:** <https://discuss.huggingface.co/t/hugging-face-support-request-dns-resolution-issue-in-spaces-environment/168073>\
**Category:** Spaces\
**Created:** [September 3, 2025, 2:10pm UTC](https://discuss.huggingface.co/t/hugging-face-support-request-dns-resolution-issue-in-spaces-environment/168073 "2025-09-03T14:10:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adilmar](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/adilmar/32/52970_2.png) [@Adilmar](https://discuss.huggingface.co/u/Adilmar)\
**Post date:** [September 3, 2025, 2:10pm UTC](https://discuss.huggingface.co/t/hugging-face-support-request-dns-resolution-issue-in-spaces-environment/168073/1 "2025-09-03T14:10:22Z")

</div>

**Subject:** DNS Resolution Error for External API ([api.wit.ai](https://api.wit.ai/)) in Hugging Face Spaces

## **Problem Description**

I’m experiencing a DNS resolution failure when trying to connect to `api.wit.ai` from a Hugging Face Space. The same code works perfectly on my local machine but fails within the Spaces environment.

## **Error Details**

text

```auto
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.wit.ai', port=443): Max retries exceeded with url: /speech?v=20221114 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f253016a710>: Failed to resolve 'api.wit.ai' ([Errno -2] Name or service not known)"))

```

## **Code Example (Working Locally)**

python

```auto
import requests

# This works on local machine but fails in Hugging Face Space
response = requests.post(
    'https://api.wit.ai/speech?v=20221114',
    headers={'Authorization': 'Bearer MY_TOKEN'},
    files={'audio': audio_file}
)

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 3, 2025, 11:23pm UTC](https://discuss.huggingface.co/t/hugging-face-support-request-dns-resolution-issue-in-spaces-environment/168073/2 "2025-09-03T23:23:54Z")

</div>

Some external APIs are reportedly being intentionally blocked. (From HF Discord)  
You might want to contact HF about it. [website@huggingface.co](mailto:website@huggingface.co)
