Different ip address for different domain


I have 2 domain names and 2 ipv4 provided by the vps provider. I have configured 1st domain with the 1st ip address. I want to configure the 2nd domain with 2nd ip provided by the vps provider. I have configured the DNS settings of 2nd domain to 2nd ip. But on creating new domain on yunohost the 2nd domain points to 1st ip(main Ip).

In short I want:

domain1.com ->
domain2.com ->

But for now both dns-conf shows same ip.
@ 3600 IN A

  • 3600 IN A

Pinging both the domains shows there assigned ips.
How can I configure Dns-conf to point it required ip?

yunohost domain dns-conf do not configure DNS. It gives you a possible DNS configuration to put on your registar DNS zone.
Do both IP addresses point to your server?

Hi @Moul

Yes both points to my server. I have configured the domain to point to 2nd ip. But the Yunohost configure the 1st ip by default to second domain too.

For domain1.com and domain2.com it shows same ip
@ 3600 IN A

  • 3600 IN A

I want domain2.com to point to 2nd ip. eg.
@ 3600 IN A

  • 3600 IN A

As @Moul said, dns won’t be configured by Yunohost or your server… it’s just a suggestion for the dns records f your registrar. The most important is the configuration of the domain. That is showing same ip because it’s the main ip adress (/etc/hosts I think) but it’s not a ip configuration (yunohost doesn’t care of that).

btw: Why do you want 2 IP pointed the same server ?

Ok , Ignoring the Yunohost Dns-conf suggestion and installing an app on the domain works well.
Only the problem is that I am unable to install the Letsencrypt certificate. It gives error:

Exception: [Errno 22] The DNS 'A' record for domain www.domain.tld is different from this server IP. If you recently modified your A record, please wait for it to propagate (some DNS propagation checkers are available online). (If you know what you are doing, use --no-checks to disable those checks.)

Is the error related to the mismatch between the domain configured ip and the Yunohost suggested ip?

For a legitimate email it should have rdns pointed to its ip address. I have two domains from which I want to send emails. So I want have 2 domains pointing to 2 different ips having rdns for both the domains.

1 Like

Hi sorry for Necroposting but did you get LetsEncrypt to work? @kanhu

1 Like

Letsencrypt has nothing to do with the pointing out different domains to different ip’s.
There might be some other issue for failing of the certificate.