Free Code for WHMCS for WHOIS Lookup for .PK Domains


.PK is TLD for Pakistan. Unfortunately, the registry has not setup WHOIS server for looking up availability/whois of .pk domains. I have played with it and found the perfect solution.

Checking availability/whois for .pk,,,,,, and can be made possible by adding following code into includes/whoisservers.php file of WHMCS.

.pk||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found||HTTPREQUEST-Domain not found

Adding PK WHOIS Servers in WHMCS V 7.x

The WHOIS Server definitions shipped with WHMCS by default can be found in /resources/domains/dist.whois.json. This file should not be edited.
To add or edit whois server definitions, begin by creating a custom whois.json file located at /resources/domains/whois.json
Inside it, define the whois servers you wish to use.
Below is a sample custom whois.json file defining the whois servers for .myextension and, and overriding the default whois server for .org

Sample whois.json Override File

        "extensions": ".myextension,",
        "uri": "socket://",
        "available": "No match for"
        "extensions": ".org",
        "uri": "socket://",
        "available": "NOT FOUND"
A WHOIS Server definition is made up of four parts.
  • extensions - A comma separated list of extensions that this WHOIS server will be used for. In the above example there are two whois servers defined, but three extensions for which lookups are defined.
  • server - This is the server that will be connected to. A whois based server should begin with socket:// and a web based request should begin with http:// or https:// A port for the server can be provided using :port on this field.
  • available - This is the string that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.

If you still not able to do so then please contact Navicosoft support at

About .PK Domain

Navicosoft provides domain names in the .PK ccTLD (country code Top Level Domain) namespace. This includes domain names with .pk,, ,, ,,,,, as well as various government only sub-domains like etc. Clients can buy domain names and additional services like web hosting directly here. 

ORDER a PKNIC Card Right Now For Only Rs. 1850

Which domain names can I choose?

In principle, you are free to choose the domain name. However, you cannot choose names that are in use by other organizations, or names that for various reasons are prohibited or reserved for technical, ethical or national considerations. You also have a duty to ensure that your registration of a domain name does not infringe another party's right to the same name. Remember that the responsibility always rests with you. Here, you can read more about choosing a name 

All new domains that are registered under .PK, must belong to one of the following second-level or third-level domains. General guidelines for each categories are given below. Payment schedule for all the domain type are the same.
.PKGeneral Second Level Domains without etc Suffix
.COM.PKGeneral Business, or Individual
.NET.PKNetwork Related Business
.ORG.PKNon-profit Organizations
.FAM.PKFamily and Individuals
.BIZ.PKGeneral Business, Promotional
.WEB.PKWeb Sites
.EDU.PKEducational Institutes
.GOV.PKDomains for Government of Pakistan
.GOB.PKDomains for Government of Baluchistan
.GOG.PKDomains for Government of Gilgit Baltistan
.GKP.PKDomains for Government of Khyber Pakhtunkhwa
.GOP.PKDomains for Government of Punjab
.GOS.PKDomains for Government of Sindh
.GOK.PKDomains for Government of Azad Kashmir

Applications for these domains must conform to the PKNIC registration policy agreement in addition to the requirements given below. In the case of any difference between the PKNIC registration policy and the specific domain terms and conditions described below, these terms and conditions will apply.

  1. The maximum domain name length is 63 characters (excluding the .pk portion), and the maximum length is 67 characters including .pk suffix
  2. For second level .PK domains, the minimum length for the domain name, exclusive of the .pk portion is four characters (e.g. A four character name before .pk can not start with one of the PKNIC second level sub-domains (e.g. com, net, org, gov, gop, etc.). For example the following domain names are not acceptable:  (,,,,, etc). The complete list of the .PK current and reserved sub-domains includes but is not limited to .COM.PK, .NET.PK, .ORG.PK, .FAM.PK, .BIZ.PK, .WEB.PK, .EDU.PK, .GOV.PK, .GOB.PK, .GOG.PK, .GKP.PK, .GOP.PK, .GOS.PK, .GOK.PK, .INFO.PK
  3. To help minimize website phishing attacks, the following restrictions are placed:
    • Any new domain registration, since August 2013, with a four character name before .pk can not contain one of the PKNIC second level sub-domains (e.g. com, net, org, gov, gop, etc.)
    • Any new second level domain registration, since May 2014, can not end with a reserved sub-domain for Government or Education (i.e.,,,,,,, Exceptions can be made for longer names who's meaning are not easily confused with government or educational functions.
  4. For third level .COM.PK, etc domains, the minimum domain name of one character are allowed (e.g. The label "pk" and all the second level suffix names are reserved for these domain types (e.g. can not register,,,, etc).
  5. A domain name can not begin with a dash "-", and can not have two consecutive dashes "--"in it. These are reserved for IDN encodings
  6. Generic dictionary words are allowed (unless they violate other terms set forth here or in the general PKNIC Registration Policy).
  7. The domain name is not present in the list of reserved or blocked names. Examples of reserved namespace are INFO.PK, NAME.PK, etc.
  8. Domain names are not required to have pre configured name servers for them.

How do I find out if a .pk domain name is available?


To find out if a name is available or to find out who registered a particular name, use our WHOIS Search tool which can be found on the home page of our website.


How much does a domain name cost?


For domain registrant based in Pakistan, a domain fee of Rs. 925/- per year will be charged. For domain registrant or their registrar located outside Pakistan, a fee of $10.77 per domain per year is charged. The fee is charged on a biennial basis (two year period) and can be paid up to a maximum of ten years. 


How soon can I start using my domain name?


Once the Registry System has been updated, the information in our database is shared with the Internet's zone files worldwide. This sharing process is called 'propagation', because the new information about your Domain Name spreads or propagates across the Internet. The zone files are propagated frequently, every few hours. We cannot control the rate at which the millions of servers on the Internet are updated, but generally your domain should be available to Internet users within a very short period.


Can I change the domain name?


Once a domain has been registered, its name can not be modified.


Why must I update registered data?


From time to time it is necessary to reach a contact person for the domain. This could be due to technical problems or disputes. In these situations, it is vital that the contact data is up to date. As the domain name holder, you are responsible for keeping your contact information updated.






Post a Comment


  1. i having a problem while adding nameserver
    i follow all the steps kindly help

  2. Hi
    Can you explain more about whois.json
    "extensions": ".myextension,",
    "uri": "socket://",
    "available": "No match for"
    "extensions": ".org",
    "uri": "socket://",
    "available": "NOT FOUND"
    what is whois server for PK domain and how can we configure here.


  3. whois server is:

    If you still not able to do it then our developers can do it for you.