wget return error

I have changed my machine ip and created A DNS record with the new IP
but I still have wget return error as follow

and the wget result show:
Resolving XX.com (XX.com)… failed: No address associated with hostname.
wget: unable to resolve host address ‘XX.com

please help need to use it in a cron job

curl returns the following:
curl: (6) Could not resolve host: XX.com