Non-www domain link is not working

I am unable to run the domain as example.com but it is working like www.example.com with ssl.
My conf file has following content -

<VirtualHost *:443>
ServerName www.domain.com
ServerAlias domain.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/domain.com

    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>

    <Directory /var/www/domain.com>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

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

SSLCertificateFile /etc/letsencrypt/live/www.domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/www.domain.com/chain.pem

I seen this link but still it doesn’t work.

Please suggest what the issue is?

What’s your domain?

What error message do you get?


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

My domain is: www.sunlightbroking.com

I ran this command: sunlightbroking.com

It produced this output: This site can’t be reached
sunlightbroking.com ’s server DNS address could not be found.

My web server is (include version): Apache/2.4.7 (Ubuntu 14.04.4 LTS)

The operating system my web server runs on is (include version): Ubuntu 14.04.4 LTS

My hosting provider, if applicable, is: digitalocean

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

You need to add an A record for @ in your DNS control panel at GoDaddy.

https://in.godaddy.com/help/add-an-a-record-19238

Ok. Thanks for the suggestion.
I am checking for this and let you know if it doesn’t fix.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.