Issue with URL Resolution/Blocked on Hugging Face Spaces

Hi everyone,

I am experiencing an issue with URL resolution in my Hugging Face Space (Chat-with-GPT - a Hugging Face Space by yuntian-deng). My setup involves sending user requests to my own URL using requests:

import requests
response =, headers=headers, json=payload, stream=True)

Where API_URL is my website URL. Recently, I encountered a problem where the URL without “www” (which I have been using for over a year now) is blocked, while the URL with “www” works fine. Here are two examples to reproduce the issue (I didn’t reveal my real API URL to avoid potential attacks):

Not working:

import requests
response = requests.get('https://[ORIG_URL]')


import requests
response = requests.get('https://www.[ORIG_URL]')

Both URLs point to the same IP address, and the non-www version has been working for over a year until now. The error I receive is:

Failed to resolve '[ORIG_URL]'

However, this issue does not occur on my own laptop (or on Hugging Face Space for the past year), and adding “www” to the URL resolves the problem on both my laptop and the Hugging Face Space. Who should I contact to take a look at this? Thank you for your help!