Report this

What is the reason for this report?

How to structure DNS records for domains with sub-domains

Posted on September 3, 2014

Hey. Let’s say I have a domain domain.com.

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

I also want to have custom sub-domains such as william.domain.com.

As of now, my DNS records looks like this.

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



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!

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.