many ip for 1 website

  • Posted April 29, 2014

Hello, After many hours thinking and chatting with my brother I decided to move my website from shared hosting to Digital Ocean. I have experience setting up my website but I was wondering, is it possible to host 1 mail server and 1 web server with different ip but both point to my domain mane? For example I want to point only to the mail server and to point to my web server. How can I do this? Also I am thinking to use nginx and Debian, is it ok? What is your opinion?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

No, it should work just fine without any special config. Let me know how it goes! :]

Thank you both, just one more stupid question. Do I have to do any special configuration with nginx?

Yes, that’s definitely possible. <br>Here’s what you need to do: <br><ol><li>Add an A record called ‘@’ with the value of your droplet’s IP address</li><li>Add an A record called ‘mail’ with the value of your 1and1 mail server’s IP address</li><li>Add an MX record called ‘@’ with the value of ‘mail’ and the priority of 10</li></ol> <br>If any of the records above already exist, just remove the old ones. If you’re not sure what your mail server’s IP address, please post the actual domain.

Yes this is possible. Just set two different A records with your DNS host for both subdomains.