[ALUG] Redirects specific domain requests to another hosts

Andreas Tauscher ta at geuka.net
Sun Jan 2 18:34:10 EAT 2022


Am 22.12.21 um 06:47 schrieb hamsoj80--- via Linux:
> Hallow Team,
> 
> Been a long time since using this platform.
> 
> I have an issue that I don't know on which angle I should tackle it. 
> *********************************************************************************
> 
> I have 2 servers 
> 1. *ns1.domain.com <http://ns1.domain.com>*
> 2. *ns2.domain.com <http://ns2.domain.com>*

> Now the challenge am facing is, when i browse *domain.com
> <http://domain.com>* it goes to any of the two randomly,

Then the record is double.
domain.com. A  IP of ns1.domain.com.
domain.com. A  IP of ns2.domain.com.
  
> My question is, how do i forward *domain.com <http://domain.com>* or
> *www.domain.com <http://www.domain.com>* to a specific host between the
> two *ns1* and *ns2* 

Then only one record must exist.

domain.com.     A IP of ns1.domain.com.
www.domain.com  A IP of ns2.domain.com.

Sounds like a CPanel setup.
DNS is in CPanel mainly broken.....

> Like when i type *www.domain.com <http://www.domain.com>* it should go
> to *ns1.domain.com <http://ns1.domain.com>* default web directory always

Fix the DNS records and it will work.



More information about the Linux mailing list