PDA

View Full Version : domain not working without www


merida
17th July 2009, 13:20
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 ???

Mark_NL
17th July 2009, 13:23
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.

merida
17th July 2009, 13:42
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 !

merida
17th July 2009, 13:51
I am having the same thing with nslookup


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

Mark_NL
17th July 2009, 14:06
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 :)

merida
17th July 2009, 14:32
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

Mark_NL
17th July 2009, 14:38
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/ )

merida
17th July 2009, 15:24
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?

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

Mark_NL
17th July 2009, 15:32
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.*

merida
17th July 2009, 15:49
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 ??

merida
17th July 2009, 15:58
thanks for your help

Mark_NL
17th July 2009, 16:02
It's because of $ORIGIN :)

read http://www.zytrax.com/books/dns/apa/dot.html

merida
17th July 2009, 16:05
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 ]

till
18th July 2009, 13:08
And you are surev that this is the authoritive dns server for the domain?

merida
20th July 2009, 16:20
indeed, it was not the authorive server.

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

freecallshub
11th April 2010, 00:59
I had this issue with my blogger account I fixed it http://amiatypist.blogspot.com/2010/04/domain-not-working-without-www.html

Toucan
11th April 2010, 04:11
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