{"id":16880,"date":"2020-03-23T11:03:22","date_gmt":"2020-03-23T11:03:22","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=16880"},"modified":"2020-03-25T09:30:55","modified_gmt":"2020-03-25T09:30:55","slug":"how-to-set-subdomain-using-dns","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-set-subdomain-using-dns\/","title":{"rendered":"How to set subdomain using DNS"},"content":{"rendered":"\n<p>Wildcard subdomains are a useful cPanel feature that allows you to direct non-existing subdomains to a specific folder on your server. They serve as a \u201ccatch-all\u201d location so that if a user enters a subdomain URL that has yet to be created (for example, http:\/\/nothinghere.yourdomain.com)&nbsp;they\u2019ll be directed to the content you determine, rather than an error page.<\/p>\n\n\n\n<p>To create a wildcard subdomain in cPanel, navigate to&nbsp;<strong>Domains -&gt; Subdomains<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/hostpapasupport.com\/knowledgebase\/wp-content\/uploads\/2018\/02\/1-7.png\"><img decoding=\"async\" src=\"https:\/\/hostpapasupport.com\/knowledgebase\/wp-content\/uploads\/2018\/02\/1-7.png\" alt=\"cPanel\" class=\"wp-image-38923\"\/><\/a><\/figure>\n\n\n\n<p>Complete the&nbsp;<strong>Create a Subdomain<\/strong>&nbsp;form, using an asterix (<strong>*<\/strong>) as the&nbsp;<strong>Subdomain name<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"595\" height=\"328\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/3-1.png\" alt=\"\" class=\"wp-image-16884\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/3-1.png 595w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/3-1-300x165.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/3-1-50x28.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/3-1-60x33.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/3-1-100x55.png 100w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/figure>\n\n\n\n<p>Select the parent domain and a folder to be used as the Document Root (this folder will hold the page content to which your users will be directed), then click&nbsp;<strong>Create<\/strong>&nbsp;to proceed.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/hostpapasupport.com\/knowledgebase\/wp-content\/uploads\/2018\/02\/3-4.png\"><img decoding=\"async\" src=\"https:\/\/hostpapasupport.com\/knowledgebase\/wp-content\/uploads\/2018\/02\/3-4.png\" alt=\"Zone Editor\" class=\"wp-image-38931\"\/><\/a><\/figure>\n\n\n\n<p>With the subdomain created, now select&nbsp;<strong>Domains &gt; Zone Editor<\/strong>&nbsp;from the cPanel menu.&nbsp;<strong>Click + A Record<\/strong>&nbsp;to create an A record for your wildcard subdomain (*.yourdomain.com.).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"820\" height=\"308\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2.png\" alt=\"\" class=\"wp-image-16882\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2.png 820w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2-300x113.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2-768x288.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2-50x19.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2-60x23.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2020\/03\/2-2-100x38.png 100w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/figure>\n\n\n\n<p>Note the additional period&nbsp;<em>after<\/em>&nbsp;your domain name. Ensure the A record points to your server\u2019s IP address.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/hostpapasupport.com\/knowledgebase\/wp-content\/uploads\/2018\/02\/5-2.png\"><img decoding=\"async\" src=\"https:\/\/hostpapasupport.com\/knowledgebase\/wp-content\/uploads\/2018\/02\/5-2.png\" alt=\"A record configuration\" class=\"wp-image-38939\"\/><\/a><\/figure>\n\n\n\n<p>Click\u00a0<strong>Add an A Record<\/strong>\u00a0to complete the configuration.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n\n\n\n<p>We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.<\/p>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Wildcard subdomains are a useful cPanel feature that allows you to direct non-existing subdomains to a specific folder on your server. They serve as a \u201ccatch-all\u201d location so that if a user enters a subdomain URL that has yet to be created (for example, http:\/\/nothinghere.yourdomain.com)&nbsp;they\u2019ll be directed to the content&#8230;<\/p>\n","protected":false},"author":18,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[34],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/16880"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=16880"}],"version-history":[{"count":5,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/16880\/revisions"}],"predecessor-version":[{"id":16910,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/16880\/revisions\/16910"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=16880"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=16880"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=16880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}