{"id":2785,"date":"2025-05-13T15:18:56","date_gmt":"2025-05-13T15:18:56","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=2785"},"modified":"2025-05-13T15:18:58","modified_gmt":"2025-05-13T15:18:58","slug":"how-to-list-dns-records-via-cli-on-whm-using-whmapi1","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/","title":{"rendered":"How to List DNS Records via CLI on WHM using whmapi1?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p>In server management, especially when administering WHM\/cPanel environments, it&#8217;s often necessary to view DNS records for troubleshooting, validation, or auditing. While the WHM interface provides graphical access to DNS Zones, using the command line can be more efficient and scriptable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Procedure:<\/h3>\n\n\n\n<p><strong>Step1:<\/strong><\/p>\n\n\n\n<p>The <code>whmapi1<\/code> tool must be run as the <strong>root user<\/strong>, as it interacts with WHM-level functionality.<\/p>\n\n\n\n<p><strong>Step2:<\/strong><\/p>\n\n\n\n<p>List All DNS Zones on the Server with below command. This command returns a list of domains configured on the server.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>whmapi1 listzones<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Step3:<\/strong><\/p>\n\n\n\n<p>View DNS Records for a Specific Domain, Replace <code>example.com<\/code> with your actual domain name.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>whmapi1 dumpzone domain=example.com<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This command outputs detailed DNS zone data, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Record type (A, MX, TXT, CNAME, etc.)<\/li>\n\n\n\n<li>Name<\/li>\n\n\n\n<li>TTL<\/li>\n\n\n\n<li>Data (target values)<\/li>\n<\/ul>\n\n\n\n<p>Example output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>data:\n  record: \n    line_index: 1\n    name: example.com.\n    type: A\n    data: 192.0.2.1<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion:<\/h3>\n\n\n\n<p>Using <code>whmapi1<\/code> is a powerful and reliable method to access DNS zone records directly from the WHM\/cPanel server CLI. It enables system administrators to programmatically retrieve and review DNS configurations without logging into the WHM UI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In server management, especially when administering WHM\/cPanel environments, it&#8217;s often necessary to view DNS records for troubleshooting, validation, or auditing. While the WHM interface provides graphical access to DNS Zones, using the command line can be more efficient and scriptable. Procedure: Step1: The whmapi1 tool must be run as the root user, as it ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2785","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to List DNS Records via CLI on WHM using whmapi1? - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to List DNS Records via CLI on WHM using whmapi1? - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction: In server management, especially when administering WHM\/cPanel environments, it&#8217;s often necessary to view DNS records for troubleshooting, validation, or auditing. While the WHM interface provides graphical access to DNS Zones, using the command line can be more efficient and scriptable. Procedure: Step1: The whmapi1 tool must be run as the root user, as it ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-13T15:18:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-13T15:18:58+00:00\" \/>\n<meta name=\"author\" content=\"Saikrishna Areddy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saikrishna Areddy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/\"},\"author\":{\"name\":\"Saikrishna Areddy\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\"},\"headline\":\"How to List DNS Records via CLI on WHM using whmapi1?\",\"datePublished\":\"2025-05-13T15:18:56+00:00\",\"dateModified\":\"2025-05-13T15:18:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/\"},\"wordCount\":173,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/\",\"name\":\"How to List DNS Records via CLI on WHM using whmapi1? - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2025-05-13T15:18:56+00:00\",\"dateModified\":\"2025-05-13T15:18:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/05\\\/13\\\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to List DNS Records via CLI on WHM using whmapi1?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\",\"name\":\"Saikrishna Areddy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g\",\"caption\":\"Saikrishna Areddy\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/saikrishna\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to List DNS Records via CLI on WHM using whmapi1? - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/","og_locale":"en_US","og_type":"article","og_title":"How to List DNS Records via CLI on WHM using whmapi1? - PheonixSolutions Knowledge-Base","og_description":"Introduction: In server management, especially when administering WHM\/cPanel environments, it&#8217;s often necessary to view DNS records for troubleshooting, validation, or auditing. While the WHM interface provides graphical access to DNS Zones, using the command line can be more efficient and scriptable. Procedure: Step1: The whmapi1 tool must be run as the root user, as it ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2025-05-13T15:18:56+00:00","article_modified_time":"2025-05-13T15:18:58+00:00","author":"Saikrishna Areddy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Saikrishna Areddy","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/"},"author":{"name":"Saikrishna Areddy","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba"},"headline":"How to List DNS Records via CLI on WHM using whmapi1?","datePublished":"2025-05-13T15:18:56+00:00","dateModified":"2025-05-13T15:18:58+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/"},"wordCount":173,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/","name":"How to List DNS Records via CLI on WHM using whmapi1? - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2025-05-13T15:18:56+00:00","dateModified":"2025-05-13T15:18:58+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/05\/13\/how-to-list-dns-records-via-cli-on-whm-using-whmapi1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to List DNS Records via CLI on WHM using whmapi1?"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba","name":"Saikrishna Areddy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g","caption":"Saikrishna Areddy"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/saikrishna\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=2785"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2785\/revisions"}],"predecessor-version":[{"id":2786,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2785\/revisions\/2786"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=2785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=2785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=2785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}