Error: The “serial” argument cannot be empty - when adding TXT record to DNS zone

Operating System & Version
CentOS v7.9.2009
cPanel & WHM Version
v100.0.1

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
When I try to add a TXT record to verify a domain with Google Search Console I get the following error in cPanel "Error: The “serial” argument cannot be empty. "

If I try to do the same in WHM DNS Zone It simply does not add and gives no feedback apart from the spinner on the "Save Record" button which starts and then stops.

There are zero google results for "Error: The “serial” argument cannot be empty. " and there are not input boxes in cpanel DNS zone that are called "serial"

So what is wrong here?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,899
465
438
Finland
cPanel Access Level
Root Administrator
I believe that "serial" is "Serial Number, in the SOA record, usually it's date&time like "2021110501".
You could edit it manyally in file /var/named/DOMAIN.TLD.db
 

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
and is it empty? the SOA value?
I cannot add an SOA type in DNS zone. Why is that?

I am actually having issues with my host Afrihost. They cannot seem to get my DNS working in WHM. They tell me I must use domain parking however they also told me I must use domain pointing, but all I wanted to do was change the nameserver with the domain, but they are the registrar and don't have that functionality. so I am pretty confused on how to use WHM with the domain they provide.
 

andrew.n

Well-Known Member
Jun 9, 2020
965
358
63
EU
cPanel Access Level
Root Administrator
I cannot add an SOA type in DNS zone. Why is that?

I am actually having issues with my host Afrihost. They cannot seem to get my DNS working in WHM. They tell me I must use domain parking however they also told me I must use domain pointing, but all I wanted to do was change the nameserver with the domain, but they are the registrar and don't have that functionality. so I am pretty confused on how to use WHM with the domain they provide.
DNS name servers needs to be changed at domain registrar, you won't be able to change that via WHM or cPanel.
 

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
Yes I know that. Afrihost are the registrar and they don't have that functionality for the user to change the nameserver in the domain settings. Its a pretty confusing setup. They have their own way of changing DNS ownership to WHM by changing my domain to parked which I still do not understand.

Apparently they are making this change for me now.

All I wanted to do was add Google Search Console verification and they ended up knocking off 12 subdomains and the main domain by doing some funky DNS ownership by using pointing instead of parking, but it must now be parking so I am totally confused as to how Afrihost make a domain point to a server. It cannot be done by the user by simply changing the nameservers because they don't give you that as the registrar.
 

andrew.n

Well-Known Member
Jun 9, 2020
965
358
63
EU
cPanel Access Level
Root Administrator
As far as I know for Google verification you only need to add a TXT record which you can do from your cPanel account, for that there is no need to change nameservers. Alternatively you can also upload a HTML file which might be easier if you are having issues handling the DNS records.
 

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
As far as I know for Google verification you only need to add a TXT record which you can do from your cPanel account, for that there is no need to change nameservers. Alternatively you can also upload a HTML file which might be easier if you are having issues handling the DNS records.
I could not add the TXT record which was the original error "Error: The “serial” argument cannot be empty. "

I need to add the DNS entry so that it covers all subdomains including "www" I don't want to add multiple search console properties for each subdomain which is how it works if you verify with HTML files.

This is an issue with Afrihost. They associate domains to servers on their end. The user cannot do this with nameservers which is why adding any DNS records gives an error.
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,041
111
118
Houston, TX
cPanel Access Level
Root Administrator
I do not have one to edit. Is this something to do with my host?
Are you in WHM or cPanel? It sounds like there might be a few issues here. I would suggest opening a support ticket using the link in my signature so we can review to make sure SOA records can be edited. Otherwise, you could contact your host so they can investigate or reach out to us directly. If you open a ticket, please provide the ID here.
 

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
Are you in WHM or cPanel? It sounds like there might be a few issues here. I would suggest opening a support ticket using the link in my signature so we can review to make sure SOA records can be edited. Otherwise, you could contact your host so they can investigate or reach out to us directly. If you open a ticket, please provide the ID here.
This is my host I believe. They tell me I can edit DNS in WHM but I cannot insert a new DNS entry. When I press Add Record, the spinner spins and then stops, but no record is inserted. If I add a subdomain all the relevant DNS records are inserted, but the new subdomain never resolves. Somehow they are not managing to connect my server with the domain and they give me no way to edit nameservers in domain settings in client zone(Afrihost) so I think they have a rather funky way of connecting domains to servers that does not work.
 

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
The host Afrihost said that I can now add DNS in WHM. This has taken 2 days to get here, but I still cannot add DNS.

I am afraid that the support channel gets answered by multiple people and they don't seem to take into consideration any of the context of the previous replies so its seems like a terrible way of getting help with anything technical.

I am setting up a ticket with you now.
 

Ben Taylor

Member
Jun 27, 2019
18
1
3
Swaziland
cPanel Access Level
Root Administrator
Are you in WHM or cPanel? It sounds like there might be a few issues here. I would suggest opening a support ticket using the link in my signature so we can review to make sure SOA records can be edited. Otherwise, you could contact your host so they can investigate or reach out to us directly. If you open a ticket, please provide the ID here.
The support ticket ID: 94381342
 

simokhounti

Member
Nov 19, 2021
5
3
3
morocco
cPanel Access Level
Root Administrator
hi i just solved the same problem you have ,

the php code i created
PHP:
private function get_soa_serial($domain)

    {



        $dns_server="type dns server here"; // you will need to put your own dns server

        $dns_query=new DNSQuery($dns_server);

        $question=$domain; // the domain name to parse

        $type="SOA"; // the type of record

        $result=$dns_query->Query($question,$type); // do the query



         return $result->results[0]->extras["serial"]; //  serial number

  

    }
DNSQuery a class you will find it HERE. (its my github)
 
  • Like
Reactions: cPanelAnthony