# Huggingface Space Not Resolving Domain Name

**URL:** <https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936>\
**Category:** Spaces\
**Created:** [January 15, 2025, 6:35pm UTC](https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936 "2025-01-15T18:35:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanveeshsingh](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tanveeshsingh](https://discuss.huggingface.co/u/tanveeshsingh)\
**Post date:** [January 15, 2025, 6:35pm UTC](https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936/1 "2025-01-15T18:35:36Z")

</div>

Hi everyone,

I’m encountering an issue with my Hugging Face Space where the domain name for an external API is not resolving, even though the domain is available. Below is the error traceback I’m getting:

```auto
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync( # type: ignore
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 962, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
  File "/home/user/app/app.py", line 111, in process_inputs
    output = classify_prompt(category,conv_prefix, response)
  File "/home/user/app/app.py", line 57, in classify_prompt
    response = requests.request("POST", url, json=payload, headers=headers)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.collinear.ai', port=443): Max retries exceeded with url: /api/v1/judge/safety (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fcb7483a320>: Failed to resolve 'api.collinear.ai' ([Errno -2] Name or service not known)"))

```

---

<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:** [January 16, 2025, 1:42am UTC](https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936/2 "2025-01-16T01:42:38Z")

</div>

If you don’t add api., you can access it properly…  
Whether this is a mistake or not, I think it’s some kind of restriction.

> [@Unable to Connect to PromptLayer API from Hugging Face Environment](https://discuss.huggingface.co/t/unable-to-connect-to-promptlayer-api-from-hugging-face-environment/135807):
>
> Issue Description: Hello Hugging Face Support Team, I am experiencing an issue where my application can successfully connect to the PromptLayer API (https://api.promptlayer.com/ping) from my local environment, but the same code fails to establish a connection when running on the Hugging Face environment. Key Details: Functionality Affected: API calls to https://api.promptlayer.com/ping Observations: The check\_internet function (which accesses https://www.google.com) works correctly on both e…

@meganariley What on earth is this?

---

<div class="post-metadata">

**Author:** ![tanveeshsingh](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tanveeshsingh](https://discuss.huggingface.co/u/tanveeshsingh)\
**Post date:** [January 16, 2025, 2:20am UTC](https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936/3 "2025-01-16T02:20:41Z")

</div>

For it to work. I need the endpoint with api. And it seems to be a weird restriction can someone from HF Team solve this

---

<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:** [January 16, 2025, 2:27am UTC](https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936/4 "2025-01-16T02:27:03Z")

</div>

It’s probably a genuine HF regulation or a mistake regulation. If it’s a mistake regulation, it should be possible to fix it by just modifying the settings a little…

---

<div class="post-metadata">

**Author:** ![tanveeshsingh](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tanveeshsingh](https://discuss.huggingface.co/u/tanveeshsingh)\
**Post date:** [January 16, 2025, 7:14pm UTC](https://discuss.huggingface.co/t/huggingface-space-not-resolving-domain-name/135936/5 "2025-01-16T19:14:02Z")

</div>

So I tried running a curl request where

```auto
curl https://api.openai.com
{
    "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference"
}

```

works whereas

```auto
curl api.collinear.ai
curl: (6) Could not resolve host: api.collinear.ai

```

Does not work. Seems to be an issue with the DNS
