How to structure DNS records for domains with sub-domains

  • Posted September 3, 2014

Hey. Let’s say I have a domain

I want all traffic to to be redirected to (this redirection is done from my web server).

I also want to have custom sub-domains such as

As of now, my DNS records looks like this.

Is this the correct way of doing it (notice the trailing dot(s))?


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.

If all your subdomains are at the same IP address as the root domain, the simplest set up is to just create a wildcard CNAME:

Check out this tutorial:

How To Set Up and Test DNS Subdomains with DigitalOcean’s DNS Panel