Lỗi a dns entry for the domain already exists cpanel năm 2024

A DNS entry for already exists error in cPanel occurs when you have a domain name on your server which was likely terminated. However, the DNS entries are still present on the server. When accounts are terminated cPanel should remove any DNS entries when you terminate an account. But sometimes some, especially in the case of add-on domain names can get left behind.

Lỗi a dns entry for the domain already exists cpanel năm 2024

A DNS entry for already exists. You must remove this DNS entry from all servers in the DNS cluster to proceed. cPanel DNS Error

Fix a DNS Entry Already Exists In cPanel

You won’t be able to create the domain name on the server again until you remove all the old entries. Luckily, cPanel provides a script that allows you to run it from the command line. This will remove any DNS entries for you.

You must have root access for this to be used. Login to your server with the root account or an account with root privileges and issue the below command

/scripts/killdns domain.com

Just swap domain.com with the domain name you are trying to deploy to your cPanel Server. This will correct the issue and you can proceed.

A DNS entry for 'domain_name' already exists. You must remove this DNS entry from all servers in the DNS cluster to proceed.

Solution -

1. Please make sure the domain which you are trying to add the addon domain should not present as addon/parked(aliases)/sub-domain on the same server.

2. If it is not present then check the DNS entry in DNS zone file. You will need root SSH access for it. SSH to server and check the below file - /var/named

3. If there is entry of domain then you can remove/kill the DNS entry using this command - /scripts/killdns domain_name

Please give a try now, it should work! You can verify the DNS entry by firing the using this command - cat /var/cpanel/userdata/$user_name/main

4. If you are still facing the same issue then you will need to check the other servers with the same DNS cluster. There should not be entry of domain on the other server which you are trying to add.

If there is DNS entry then you will need to remove that entry. (Please make sure the domain which you are trying to add is present as addon domain/parked domain(aliases)/sub-domain).

Note -

Please take backup of DNS zone file before editing it (for safe-side). You can fire below command for it -

Resellers and server owners in cPanel/WHM servers come across this error message when creating domains in their server.

As part of our Outsourced Technical Support for web hosts, we routinely resolve such cPanel/WHM account related errors.

“A dns entry for the domain already exists” – When do you see this error?

cPanel/WHM control panel provides an easy way for server owners to create new domains via WHM interface. But this can give error in certain scenarios.

One such scenario is that a DNS entry for the domain already exists, and the error message shows:

Account Creation Status: failed, A DNS entry for domain.com already exists, You must remove this DNS entry from all servers in the dns cluster to proceed.

The same error can also happen when resellers try to add addon domains to their hosting via their WHM.

Account Creation Status: failed, Sorry, a DNS entry for example.com already exists, please delete it first (from all servers in the dns cluster)

3 reasons why the error “A dns entry for the domain already exists” shows up

A DNS zone file is a simple text file which is is essential for the functioning of DNS service. Each domain (or addon domain) has a unique DNS zone file in the server.

The DNS file for a domain contains the resources records for that particular domain. These include MX entry, nameserver details, CNAME records, etc.

If the DNS Zone File for a domain already exists in the server, you cannot create a new domain or addon domain in that server with the same name, and it will throw up this error.

There are 3 main scenarios when the DNS zone file already exists in the server.

1. Domain termination incomplete

Most common reason for the error is that a domain with the same name you are creating, existed previously in that server. When that domain was terminated, it may not be properly removed from the server due to software bug or process crash.

This can lead to the DNS Zone entry already existing in the server for this domain, making it impossible to create a new one with the same name, as it will lead to conflicts.

2. ‘Keep DNS Zone’ option enabled

When you terminate an account via WHM, there is an option to select ‘Keep DNS Zone’ in the Terminate Account Screen.

Lỗi a dns entry for the domain already exists cpanel năm 2024

‘Keep DNS zone’ feature in ‘Terminate Account’

If this option is selected during account termination, the DNS zone for the domain will not be deleted from the server. This will lead to error when creating a new domain in the same name.

3. Domain records exist in server

‘DNS entry already exists’ error also occurs when the domain you try to create, has already been added to an existing cPanel account.

If a domain already exists, you cannot add the same domain name without deleting it.

How to fix the error “A dns entry for the domain already exists”

When faced with the error, the first thing we do is to check if a valid domain with the same name already exists in the server.

If not, the DNS zones should be checked and the corresponding DNS record should be deleted. Any DNS record with reference to that domain is also deleted.

For nameservers that are part of a DNS cluster, the DNS record has to be removed in all the nameservers, or else conflicts and errors can occur.

Deleting DNS records should be done with utmost caution, as there are chances of losing custom DNS settings or accidentally deleting wrong records.

At times, the deletion of records from WHM may not work or the record may not show up in WHM. In such cases, we manually delete the DNS zones from respective folders and configuration files.

This check is done in all the nameservers which host the DNS zones, in the case of clusters. Adequate backups are taken to avoid any hiccups that can arise during the process.

Conclusion

Software bugs or human errors can cause errors in account management. We’ve seen the three scenarios of account creation errors our Support Engineers see in the cPanel/WHM servers that we manage, and how we fix them.

PREVENT YOUR SERVER FROM CRASHING!

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.