Question

I can ping my subdomain, but when I browse it, it always load the top domain.

Followed the instructions in DO on how to setup and my Domain Server.


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It is working now. it took more time than expected for the Domain to propagate. Thank you all.

Still the same problem. I added CNAME as instructed:

$ORIGIN domain.org. $TTL 1800 domain.org. IN SOA ns1.digitalocean.com. hostmaster.domain.org. 1475372848 10800 3600 604800 1800 domain.org. 1800 IN NS ns1.digitalocean.com. domain.org. 1800 IN NS ns2.digitalocean.com. domain.org. 1800 IN NS ns3.digitalocean.com. domain.org. 1800 IN A 128.199.118.215 domain.org. 1800 IN MX 1 aspmx.l.google.com. domain.org. 1800 IN MX 5 alt1.aspmx.l.google.com. domain.org. 1800 IN MX 5 alt2.aspmx.l.google.com. domain.org. 1800 IN MX 10 alt3.aspmx.l.google.com. domain.org. 1800 IN MX 10 alt4.aspmx.l.google.com. lists.domain.org. 1800 IN CNAME domain.org.

and made changes to VH: <VirtualHost *:80> ServerAdmin admin@domain.org ServerName lists.domain.org DocumentRoot /var/www/domain.org/public_html

<Directory /var/www/lists.domain.org/public_html/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

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

</VirtualHost>

Hi again, Looks like both ZONE file and Apache VH are problem.

Looking at ZONE file, I can’t see record for your subdomain. You can add an CNAME record to make it work. Login into your DigitalOcean Control Panel Go to Networking -> Domains, select your domain Select CNAME option, for name enter name of subdomain (e.g. lists) and for hostname enter @. @ ensures that CNAME record will be applied to origin domain name (domain.org). When this step is completed you will see new entry in ZONE file, it it will be like:

lists.domain.org. 1800 IN CNAME domain.org.

Now flush your DNS&Browser cache and try again. Sometimes it takes longer for DNS changes to be propagated.

I can recommend adding ServerName directive to Apache Virtual Host for subdomain:

<VirtualHost *:80>
    ServerAdmin admin@domain.org
    ServerName lists.domain.org
    DocumentRoot /var/www/domain.org/public_html

    <Directory /var/www/lists.domain.org/public_html/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

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

</VirtualHost>

Try the following procedure, if problem still persists, we will try to find solution by searching for logs, etc. But I think this will be enough, we will see. :)