Redirect everything to a sub domain
I have bought a domain
GoDaddy. In GoDaddy, I have customised
DigitalOcean as name servers.
I would like to customise DNS of DigitalOcean to realise this: If I enter the urls
www.domain.com in a browser, I want the url to become
sub.domain.com in the browser, and the browser shows the site in my server IP
Because of the jet lag and DNS cache issue, it is hard to try and test a setup (hard to say if it is a wrong setup or just need to wait). So could anyone give me a full list of records (A, CNAME…) to realise this?
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.