Question
Make domain url lead to subdomain
I have bought a domain domain.com
from GoDaddy
. In GoDaddy, I have customised DigitalOcean as name servers; in DNS of DigitalOcean, I have added the following records:
A | @ | 178.62.x.y |
CNAME | sub | domain.com |
CNAME | www.sub | domain.com |
As a result, when I type sub.domain.com
and www.sub.domain.com
in a browser, they both lead to sub.domain.com
, which is what I want.
Currently domain.com
and www.domain.com
lead to the default site of my server. However, I also want them to lead to sub.domain.com
.
Does anyone know what to do to make this happen?
Thank you
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.
×