domain not working without www

Discussion in 'General' started by merida, Jul 17, 2009.

  1. merida

    merida New Member

    i have an strange problem, with a domain of mine, which i call mydomain.com

    - in my browser, i can acess my domain if I use the prefix www.
    thus : http://www.mydomain.com works fine

    - in my browser, i can NOT access the domain without the www.
    thus : http://domain.com does not work

    same happens with nslookup: nslookup finds the correct IP for the www.mydomain.com but fails to find something for mydomain.com

    any ideas what might cause this problem ???
     
  2. Mark_NL

    Mark_NL Member

    Not sure about ISPConfig 3 .. but when you add a site, i'll only create a co-domain for domain.com, you've to add one called *.domain.com yourself after adding the site ..

    also your dns record should have domain.com and www.domain.com (or maybe a *.domain.com) pointing to your ip.
     
  3. merida

    merida New Member

    in ispconfig3, I have setup the zone (SOA) as mydomain.com
    so I am rather convinced that things are fine on DNS level

    any more ideas to help me out. i am pulling my hair out !
     
  4. merida

    merida New Member

    I am having the same thing with nslookup


    nslookup www.mydomain.com --> no problem
    nslookup domain.com --> nslookup does not give back any result
     
  5. Mark_NL

    Mark_NL Member

    setting domain.com as SOA doesn't mean that it's already bound to your IP.

    so create an A record:

    mydomain.com A 1.2.3.4

    save, enjoy :)
     
  6. merida

    merida New Member

    Dear Marc, thanks for helping me. however, i already had the following dns records:

    A xxx.163.67.237 0
    A mydomain.com xxx.163.67.237 0
    A mail xxx.163.67.237 0
    A ns1 xxx.163.67.237 0
    A www xxx.163.67.237 0
    MX mail.mydomain.com 10
    MX mydomain.com mail.mydomain.com 10
    NS mydomain.com ns1.mydomain.com 0


    you remark that this list has two "empty host" dns records:


    A xxx.163.67.237 0
    MX mail.mydomain.com 10


    This did not make any difference to the final result. I removed and added these two records, but nothing changed.

    so the problem is still here.

    on top of that, i also have another problem, which is probably related to my first one:

    my mailserver works: i can send/receive emails from my mailserver
    which is called mail.mydomain.com. thus emails for <name>@mail.mydomain.com arrive without any problem.

    however, with the MX records mentioned above, I can not recieve any email at <name>@mydomain.com


    To summarize:

    - no emails can be recieved at mydomain.com
    - nslookup fails at mydomain.com
    - website is not reachable at mydomain.com

    but:

    - website is reachable at www.domain.com
    - emails can be recieved at mail.mydomain.com
     
  7. Mark_NL

    Mark_NL Member

    as long as "mydomain.com" resolves to nothing, all your problems will keep existing.

    i do not see the point in these records:
    A xxx.163.67.237 0
    MX mail.mydomain.com 10



    if you want to, you can PM me your real domain, so i can have a look at it.

    If you run your own dns server you probably also need a glue record ( http://faq.domainmonster.com/dns/glue_record/ )
     
  8. merida

    merida New Member

    Dear Marc,

    please correct me if i am wrong, but i have this record:

    A mydomain.com xxx. 163.67.237 0

    which means that mydomain is resolved.

    -------------

    Anyway, i made some progress: In my dns records, i added a dot (.) after mydomain.com. Now nslookup seems to work

    ------------------

    However, the email problem persist. I can receive email from gmail, but not from hotmail. however, i have only one working nameserver. could this be a problem?

    ------------------------
     
  9. Mark_NL

    Mark_NL Member

    ah you've missed the "." in the end :p

    well, the changes could take a while for all the caches are rerfeshed

    host -t mx mydomain.com

    should return your mail server's address now .. if you have problems receiving mail there, look at the error logs /var/log/mail.*
     
  10. merida

    merida New Member

    yes, i missed the dot (.) at the end.
    Why is it imporant?

    i would suppose that

    mydomain.com

    means the same thing as

    mydomain.com.

    Why do i need the dot at the end ??
     
  11. merida

    merida New Member

    thanks for your help
     
    Last edited: Jul 17, 2009
  12. Mark_NL

    Mark_NL Member

  13. merida

    merida New Member

    Marc, the output of


    host -t mx mydomain.com


    mydomain.com mail is handled by 10 mail.mydomain.com.
    mydomain.com mail is handled by 10 mail.mydomain.com.mydomain.com.

    These are the DNS records:


    A mail 111.222.67.237 0
    A ns1 111.222.67.237 0
    A www 111.222.67.237 0
    A mydomain.com. 111.222.67.237 0
    MX mydomain.com. mail.mydomain.com. 10
    NS mydomain.com. ns1.mydomain.com. 0


    [to saveguard from spammers/hackers, i changed my IP address ]
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    And you are surev that this is the authoritive dns server for the domain?
     
  15. merida

    merida New Member

    indeed, it was not the authorive server.

    thx to the suggestions of Mark, the problem is solved now.
     
  16. freecallshub

    freecallshub New Member

  17. Toucan

    Toucan Member

    I can't help feeling you've gone about this the wrong way. When adding dns records just use the wizard and do not add www in the soa. Then when adding the site, again, don't add www but do add *. in the subdomain field.

    Works for me everytime
     

Share This Page