domain name system – nslookup is showing different ip address for subdomains


I recently moved my web service to a new host. In the new host when my clients access www they get a message saying the SSL is not correct. Under my investigation, I found a problem with the name mistake.

My certificate is not working with www, but it is working fine with domain.com.

Under my investigation as well, I found nslookup is showing different IP address when I “trace” to domain.com and when I do the same thing to www.domain.com

How can I fix it? Is it only about cache in the DNS servers?