Question

How can I redirect www.mysite.com to mysite.com using DigitalOcean DNS?

  • Posted on December 18, 2012
  • maiconfzAsked by maiconfz

I’ve tried to use cname, A record, and I didn’t get it to work.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Create CNAME record: <br>www <br>mysite.com.

We’ve done this redirect multiple times and it’s always been through a redirect on the web service layer whether that’s in Apache or Nginx. <br> <br>In Nginx you can do this very simply: <br>server { <br> listen 80; <br> server_name mysite.com; <br> return 301 https://www.mysite.com$request_uri; <br> } <br> <br>If you are using Apache let us know.

Sorry to re-open this thread…

I need to redirect: mail.mydomain.com to other URL google.com/mail

I’m using Ngix, how can I do this? May I do this in DNS or in nginx config?

Cheers.