- Home /
Is it possible to avoid DNS lookup when using UnityWebRequest and a shared hosting service?
Hi, I have been measuring the response times in our app when accessing a .php file from a webserver on a shared hosting service.
I measure the response time by comparing Time.unscaledTime before and after calling the webRequest.SendWebRequest() with a yield.
I have logged this using unity analytics and the average value for some countries is surprisingly high, the average can be up to 40 seconds for some countries (1.2k measurements that day for that country).
One contributor here is probably the DNS lookup, is it possible to somehow avoid that? I cant simply replace the domain name with an IP since it is a shared hosting service where multiple domains share same IP.
The hosting company told me to set up an A record for the IP address with "@" as Hostname inside the app. They also suggested to setup a CNAME record with www as hostname and point it to our domain. Is that possible using the Unity APIs?
Any other suggestions?
Thanks!