Welcome to Centmin Mod Community
Register Now

Domains domain.com works but www.domain.com doesn't.

Discussion in 'Domains, DNS, Email & SSL Certificates' started by Vishall, Aug 5, 2014.

  1. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    2:09 PM
    1.7
    MariaDB 10
    Hi all, i need some help here, please!
    domain.com works but Domain Name Registration and Web Hosting | Domain.com doesn't work.

    Here's my current domain.com.conf
    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    #            listen   80;
    #            server_name mysite.com;
    #            return 301 $scheme://www.mysite.com$request_uri;
    #       }
    
    server {
      server_name mysite.com www.mysite.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/mysite.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/mysite.com/log/error.log;
    
      root /home/nginx/domains/mysite.com/public;
    
      location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      try_files $uri $uri/ /index.php?$uri&$args;
    
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    all help will be greatly appreciated :)
     
    Last edited: Aug 7, 2014
  2. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    2:09 AM
    1.11
    10.2
    • Like Like x 1
  3. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    2:09 PM
    1.7
    MariaDB 10
    Thanks for the reply!

    Good to know it works on your side, i'd try from a different PC when i get home :)
     
  4. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    2:09 PM
    1.7
    MariaDB 10
  5. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    2:09 AM
    1.11
    10.2
    YES, very sure.
     
  6. RoldanLT

    RoldanLT Well-Known Member

    3,828
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    2:09 AM
    1.11
    10.2
    It's your dns problem.
    use Google DNS.
     
  7. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    4:09 AM
    Nginx 1.13.x
    MariaDB 5.5
  8. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    2:09 PM
    1.7
    MariaDB 10
    I'm not sure what's happening but take a look at my zone file. i'm pretty sure it's correct :/

    Code:
    $TTL    1800
    @        IN    SOA    NS1.DIGITALOCEAN.COM.    hostmaster.buyselltt.com. (
                1407197919 ; last update: 2014-08-05 00:18:39 UTC
                3600 ; refresh
                900 ; retry
                1209600 ; expire
                1800 ; ttl
                )
                 IN      NS      NS1.DIGITALOCEAN.COM.
                         NS      NS2.DIGITALOCEAN.COM.
                         NS      NS3.DIGITALOCEAN.COM.
    @    IN A    104.131.211.60
    www    IN A    104.131.211.60
     
  9. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    4:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  10. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    2:09 PM
    1.7
    MariaDB 10
    Interesting, but i can't remember if i did set it up via NSD (silly me) :rolleyes:

    if i did, is there a way to reverse it?
     
  11. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    4:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    If you domain is pointing to ns1-3.digitalocean.com name servers, anything you set in NSD locally is ignored (hence the problem you originally have) - so no need to reverse it. You can just disable NSD via command

    Code:
    service nsd stop
    chkconfig nsd off
    to re-enable
    Code:
    service nsd start
    chkconfig nsd on
     
    • Like Like x 2