{"id":2922,"date":"2025-09-01T13:16:26","date_gmt":"2025-09-01T13:16:26","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=2922"},"modified":"2025-09-01T13:16:28","modified_gmt":"2025-09-01T13:16:28","slug":"how-to-add-an-addon-domain-in-cpanel-with-cli-uapi","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/","title":{"rendered":"How to Add an Addon Domain in cPanel with CLI (uapi)?"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><strong>Introduction:<\/strong><\/h3>\n\n\n\n<p>Managing domains through the cPanel graphical interface is common, but for system administrators and developers, the command line often provides more speed, flexibility, and opportunities for automation. Using <strong>cPanel\u2019s UAPI (Universal API)<\/strong>, we can easily add an <strong>Addon Domain<\/strong> directly from the command line.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Steps to Add an Addon Domain Using UAPI:<\/strong><\/h5>\n\n\n\n<p><strong>Step 1:<\/strong><\/p>\n\n\n\n<p>Log in to cPanel server as the cPanel user<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>ssh username@ServerIP<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note: <\/strong>Replace <code>username<\/code> with the cPanel account\u2019s username.<\/p>\n\n\n\n<p><strong>Step 2:<\/strong><\/p>\n\n\n\n<p>Before adding a new addon domain, we can list existing domains linked to the cPanel account<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>uapi &#8211;user=username DomainInfo list_domains<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This command will display <strong>primary, addon, parked, and subdomains<\/strong> already configured. <\/p>\n\n\n\n<p><strong>Step 3:<\/strong><\/p>\n\n\n\n<p>Run the following command to add a new addon domain<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>uapi &#8211;user=username SubDomain addsubdomain domain=test.<code>example.com<\/code> rootdomain=<code>example.com<\/code> dir=public_html\/example<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Explanation of options:<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>--user=username<\/code> \u2192 The username of cPanel account under which we are adding the domain.<\/li>\n\n\n\n<li><code>domain=test.example.com<\/code> \u2192 The domain name we want to add.<\/li>\n\n\n\n<li><code>dir=public_html\/example<\/code> \u2192 The document root (where website files will be stored).<\/li>\n\n\n\n<li><code>subdomain=example<\/code>.com \u2192 A subdomain automatically created and linked to the addon domain.<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 4:<\/strong><\/p>\n\n\n\n<p>After execution, we can confirm the new addon domain was added by running.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>uapi &#8211;user=username DomainInfo list_domains<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>we should now see <code>test.example.com<\/code> listed under <strong>addon domains<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion:<\/strong><\/h3>\n\n\n\n<p>Adding an addon domain through the cPanel CLI with UAPI provides a fast, scriptable, and efficient way to manage multiple websites from one account. Instead of navigating through the cPanel dashboard, administrators can execute a single command to create addon domains.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Managing domains through the cPanel graphical interface is common, but for system administrators and developers, the command line often provides more speed, flexibility, and opportunities for automation. Using cPanel\u2019s UAPI (Universal API), we can easily add an Addon Domain directly from the command line. Steps to Add an Addon Domain Using UAPI: Step 1: ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/\" 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-2922","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 Add an Addon Domain in cPanel with CLI (uapi)? - 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\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add an Addon Domain in cPanel with CLI (uapi)? - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction: Managing domains through the cPanel graphical interface is common, but for system administrators and developers, the command line often provides more speed, flexibility, and opportunities for automation. Using cPanel\u2019s UAPI (Universal API), we can easily add an Addon Domain directly from the command line. Steps to Add an Addon Domain Using UAPI: Step 1: ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-01T13:16:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-01T13:16:28+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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/\"},\"author\":{\"name\":\"Saikrishna Areddy\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\"},\"headline\":\"How to Add an Addon Domain in cPanel with CLI (uapi)?\",\"datePublished\":\"2025-09-01T13:16:26+00:00\",\"dateModified\":\"2025-09-01T13:16:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/\"},\"wordCount\":255,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/\",\"name\":\"How to Add an Addon Domain in cPanel with CLI (uapi)? - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2025-09-01T13:16:26+00:00\",\"dateModified\":\"2025-09-01T13:16:28+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/09\\\/01\\\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add an Addon Domain in cPanel with CLI (uapi)?\"}]},{\"@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 Add an Addon Domain in cPanel with CLI (uapi)? - 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\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/","og_locale":"en_US","og_type":"article","og_title":"How to Add an Addon Domain in cPanel with CLI (uapi)? - PheonixSolutions Knowledge-Base","og_description":"Introduction: Managing domains through the cPanel graphical interface is common, but for system administrators and developers, the command line often provides more speed, flexibility, and opportunities for automation. Using cPanel\u2019s UAPI (Universal API), we can easily add an Addon Domain directly from the command line. Steps to Add an Addon Domain Using UAPI: Step 1: ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2025-09-01T13:16:26+00:00","article_modified_time":"2025-09-01T13:16:28+00:00","author":"Saikrishna Areddy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Saikrishna Areddy","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/"},"author":{"name":"Saikrishna Areddy","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba"},"headline":"How to Add an Addon Domain in cPanel with CLI (uapi)?","datePublished":"2025-09-01T13:16:26+00:00","dateModified":"2025-09-01T13:16:28+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/"},"wordCount":255,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/","name":"How to Add an Addon Domain in cPanel with CLI (uapi)? - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2025-09-01T13:16:26+00:00","dateModified":"2025-09-01T13:16:28+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/09\/01\/how-to-add-an-addon-domain-in-cpanel-with-cli-uapi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to Add an Addon Domain in cPanel with CLI (uapi)?"}]},{"@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\/2922","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=2922"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2922\/revisions"}],"predecessor-version":[{"id":2946,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2922\/revisions\/2946"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=2922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=2922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=2922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}