Question

Subdomain VHost File. It works, but not for the subdomain

I’ve followed countless questions and tutorials on DigitalOcean and other sites on creating a vhost file. I’ve done it, and I can get my site, http://nder.rocks to display a page. However, http://Alexa.nder.rocks does not. I copied the Vhost file from nder.rocks and changed it for Alexa.nder.rocks. Yet Alexa.nder.rocks doesn’t show.

I even went and disabled nder.rocks’s vhost and now Alexa.nder.rocks website is showing up when I visit nder.rocks. So, I know the vhost file works. I know there are zero issues in permissions. So what gives?

I’ve got the subdomain as an AName in DO’s preferences. Pointing to the same droplet (I only have the one droplet). It’s been two days so TTL should have updated. Right? What am I missing?


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.

Hello friend!

This is usually something very minor and easy to overlook. It looks like you are using Apache, so with that in mind, what values do you have for these variables in each virtual host?

ServerName ServerAlias

Make sure you don’t have a wildcard (like *.nder.rocks) on one of them.

Kind Regards, Jarland