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
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!
I don’t get your setup, because now you redirect sub.domain.com to domain.com and you want to redirect domain.com to sub.domain.com ? But anyway, if you want domain.com to sub.domain.com just use a cname for it and it will work. Name: domain.com Hostname: sub.domain.com
Yes, just change your A record with the name sub.domain.com to 178.62.x.y Then create the CNAME so domain.com will get redirected to sub. domain.com and that will redirected to your servers ip
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.