Domain name connects to Apache only with subdomain www

Hello, I have a domain name which is configured with the name servers, and

Putting in a browser (firefox) loads the Apache2 test page correctly, however alone shows an “unable to connect” page. The other strange thing is that is loaded as normal non-secure page, whereas jumps to in the address bar.

In the digitalocean DNS settings I have for the A and CNAME entries

CNAME is an alias of

A directs to

CNAME is an alias

NS directs to

NS directs to

NS directs to

Also the doesn’t redirect as it should, but it’s the “” problem that I’m most concerned with.

Can anyone please help?



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thank you and yes, that’s exactly right. The two definitions ServerName and ServerAlias were missing from (and from that of one other virtual host). Here is the entire file:

<VirtualHost *:80>
        DocumentRoot /var/www/

        ErrorLog ${APACHE_LOG_DIR}/error-escuta.log
        CustomLog ${APACHE_LOG_DIR}/access-escuta.log combined

I’m currently trying a few things to get the MX entry to work. If I can’t fix it, I’ll send another message on this thread.

All the best,

Hi @surdo,

I can see the domain’s A record is working properly. That would mean that the issue is with the Apache virtual host file. Most probably there is one tiny misconfiguration that needs to be changed.

Can you provide us with the configuration file in order to provide further assistance in what might be reconfigured?

Regards, KFSys