Question

How to create a sub domain?

I added CNAME and configured virtual host perfectly, but sub domain not working, please help me anyone…


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,

If this is going to be a separate website, I would recommend adding an A record for your subdomain name rather than CNAME. That way if the A record for your main domain changes, it would not affect your subdomain.

Also, note that it could take between 1 and 72 hours for the DNS cache to clear over the Globe before you could see your new DNS records.

If you are still experiencing the issue, you could share your Vhost here and I could try to advise you further.

Regards, Bobby