Select Page

DirectAdmin change server IP : A perfect approach

Web hosting servers often need IP address change due to network restructuring, Spam blacklisting, change of service provider, etc.

This IP change affects all services on the server. A mistake in the whole process can cause downtime for all the domains hosted on the DirectAdmin server.

At Bobcares, we help server owners accomplish these server administration tasks as part of our Dedicated Support Services.

Today, we’ll see the steps to change server IP on a DirectAdmin server with least downtime.

Prepare DirectAdmin server for IP change

The main IP address on the server is linked to the domains in multiple ways.

  1. All domains will have the main server IP address, especially when it is a shared server with multiple accounts.
  2. Mail traffic will originate from this main IP address.

That is, any change in this IP address affects all the websites on the server.

To reduce the down time associated with IP address change, our Hosting Support Engineers do the following.


1. Lower DNS cache (TTL)

In every domain’s DNS records, there is a parameter called “TTL” which determines the time for which dns results are kept in a computer’s memory. After this TTL time, records are fetched again from the dns records.

If this TTL value is set low as 5 minutes, new records will be fetched in just 5 minutes.

So we lower the TTLs in all DNS zone files at least a day prior to the IP change. Thus, the new DNS will propagate quickly.


2. Update DirectAdmin License

DirectAdmin license is linked to the main IP address of the server. So a server IP change without proper license update can result in the error:

The ip of this machine () does not match the ip in the license file.


To avoid this, our Support Specialists contact DirectAdmin support well ahead of the move with the license id, old IP address etc. Once we get a positive reply on the change request, we proceed with the actual IP change.


Actual Steps for server IP change

Directadmin comes with many built-in scripts to make IP change easier.

Let us see the actual steps involved in the process:


1. Get new license file

After DirectAdmin support has approved our IP change request, we need to get the new license on the server with the command :

cd /usr/local/directadmin/scripts
./ <clientid> <licenseid>

So if your client ID number is 1234 and license ID is 56789, the exact command will be

./ 1234 56789

2. Start DirectAdmin with new License

Now, we need to start DirectAdmin with the new license. To do this, execute :

/etc/init.d/directadmin restart

3. Replace old server IP with new IP

Again directadmin script comes handy here.

To replace the old server IP address, just execute the following commands.

cd /usr/local/directadmin/scripts

Protip: Do not attempt to add or remove IP address from DirectAdmin panel. This will create conflict in configuration files.

4. Restart related services

To make all services aware of the IP change, we need to restart all services such as mail, ftp, web etc.

/etc/init.d/httpd restart
/etc/init.d/proftpd restart
/etc/init.d/exim restart
/etc/init.d/dovecot restart

After restart, we check and confirm that all service ports like 80, 25, 21 etc. are correctly listening on the new IP address.


Additional checks after IP change

Just like any other server involved in IP change, our Dedicated Support Engineers complete the process of DirectAdmin server IP change by making the following changes.

1. Backup configuration

We modify the server IP in the custom backup scripts of the server. Also we modify the backup server firewall to accommodate connections from new server IP.

2. Monitoring system

To provide 24×7 uptime, most servers have real time monitoring configured. So we need to update the new server IP address in the monitoring software configuration too.

3. Inform domain owners

Some domain owners may be using domain IP address in their website files. To avoid possible issues for such customers, it is always recommended to inform them about the IP change. A mass mail to all customers hosted on the server will be the best option here.


DirectAdmin server IP change may appear as a pretty simple task. But a small mistake can take down all your websites. Today we’ve seen how our Dedicated Support Engineers properly plan and change the server IP with minimal downtime.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


Submit a Comment

Your email address will not be published. Required fields are marked *

Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.

Related Posts