Domain doesn't work without the www but it works with the www

1 post / 0 new
#1 Mon, 10/30/2017 - 18:21

Domain doesn't work without the www but it works with the www

Hi Everybody,

I have two problems:

1) When I enter to my site with it works, but when I want to enter without the www doesn't work (example: without the www). Some hours ago, it was working intermittent without the www, the first time didn't enter and the second time it entered. I've been trying to fix this for days but I haven't been able to fix it. {Today, I wanted to add the rDNS in my hosting but it was telling me that I hadn't an A record, so I added it, but then I couldn't add the rDNS anyway, so I deleted the A record (that I had just added it) and it stop entering without the www anytime (i don't know if that something to do with this or not, but I was having this problem before that anyway)}, I mean it is not working now without the www but it's still working with the www. I have another domain, that is working with or without the www in the same server, in two different virtual servers, but I cannot find the difference between them. All the NS records in my registrar and in Virtualmin are ok. If I make a whois (without or with www) it shows me the correct information of my registrar and NS servers. But if I make a ping doesn't work. if I make it with the www (ping it works good. I find someone had this same problem in the past and posted here, but it wasn't solved (in this link: Non-www version does not work but www works ). I didn't want to post in that link because it was too old (from 2009). I don't know if this could be a bug maybe.

2) Another problem that I am having is that each time I reboot the machine, the hosts file (/etc/hosts) it keeps getting rewrite. I found some people having the same problem but I couldn't solved it with those posts and they were in different environments.

Anybody have any idea of what could be happening?

I am using Virtualmin/Webmin/Usermin and Ubuntu 16.04.2 on a VPS hosting online server.
Webmin version 1.860 / Usermin version 1.720 / Virtualmin version 6.01-3 Apache Webserver / BIND 9 DNS Server / Postfix Mail Server / Dovecot IMAP / POP3 Server / ProFTPD FTP Server / SSH Server / MySQL Database Server / PHP different versions / Let's Encrypt certificates // I have all packages up to date. I am using Ubuntu but I am planning switching to Debian.

I am new in this forum, so I am sorry if I am doing something wrong. It's kinda urgent, so I would appreciate it if you can answer me as soon as possible.

Thanks in advanced,