www.domain.com not working, domain.com working, why??

March 7, 2014 12.7k views
Hi, I created a virtual host and httpd.conf reads as follows DocumentRoot /srv/http/shilpi.com ServerName shilpi.com ServerAlias www.shilpi.com ErrorLog "/var/log/httpd/shilpi.com-error_log" CustomLog "/var/log/httpd/shilpi.com-access_log" common Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all Now when I visit http://shilpi.com it works but if I visit www.shilpi.com I get the message webpage is not available. Anybody any clue??? Thanks
3 Answers
you have to add a www entry to the dns, I think an A record with www on the left and @ on the right will do the trick. After adding it, wait 15+ minutes for the new entry to appear, and the old cached entry to expire.
thinking about it, I think @ on the right will only work with a CNAME.

if you add an A, put in your IP address on the right,
if you add a CNAME, put in shilpi.com on the right

CNAME or A will work, you only need one or the other, not both.
Its working now.

I put www in the left column and @ in the right column in CNAME record.

  • Heyy for me same issue.

    still www.domain.com not working.

    i have put cname entry as * in left while domain.com on the right.

    wwww.domain.com is working
    also ww.domain.com is working, while www.domain.com not working...

    Any Pointers??

    • i have the same problem
      i have put cname entry as * in left while domain.com on the right.
      put not working

Have another answer? Share your knowledge.