Hey guys. I’m trying to do a “redirection” from www.domain.com to domain.com without using nginx.
In my droplet, other than the 3 NS, i have the below records:
A (@) mass-cool.com directs to 165.22.245.100
CNAME www.mass-cool.com is an alias of mass-cool.com (@)
or you can refer to this screenshot.
I’m not sure what i’m doing wrong :(
Any help is appreciated, 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!
DNS just resolves domains to their corresponding IP address, so if both www.domain.com and domian.co are setup to point to the same IP address then you are all set.
What you are probably referring to is redirecting an HTTP request to www.domain.com to domain.com which would require updating your HTTP server. If you are using nginx, then you would need to update your nginx configuration to do that.
Likewise if you are using a different webserver then it would require you to update the configuration there.
To do it via nginx here is a tutorial: https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7
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.