www.... does not work in my domain but *.domain.com works please help me to solve this problem

April 27, 2017 727 views
CentOS DigitalOcean

www.mydomain.com does not work
mydomain.com works
*.mydomain.com works

2 Answers

What is the actual domain?


Without knowing the domain, we can’t really check the DNS to see what is or isn’t valid. With that, my suggestion would be to make sure your DNS looks like:

A          @          DROPLET_IP
A          *          DROPLET_IP
CNAME      www        domain.com

… and that your VirtualHost (Apache) or Server Block (NGINX) is setup properly. Of course, these are just suggestions. We’d need to check your DNS and look at the configuration if the DNS matches the above.

Have another answer? Share your knowledge.