{"id":4442,"date":"2018-03-14T21:20:09","date_gmt":"2018-03-14T21:20:09","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2018\/03\/14\/how-to-point-a-subdomain-to-github-pages\/"},"modified":"2021-08-16T22:28:17","modified_gmt":"2021-08-17T02:28:17","slug":"how-to-point-a-subdomain-to-github-pages","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/","title":{"rendered":"How to Point a Subdomain to GitHub Pages"},"content":{"rendered":"<pre><code>You may recall, in a previous article, we explained how you can &lt;a href=\"\/support\/website\/git\/how-to-use-a-custom-domain-with-github-pages\/\"&gt;point a domain to GitHub&lt;\/a&gt; to host a static site.    In this article, we're going to show you how you can do the same thing but for a subdomain. &lt;\/p&gt; &lt;p&gt;    There are many reasons why you might want to use a subdomain.   You may want to use a subdomain for testing, or, you may already have a site on your primary domain and would like to point a subdomain to GitHub pages. &lt;\/p&gt; &lt;p&gt;   Whatever the reason, using a subdomain as a custom domain for GitHub Pages is easy to set up.   Follow along with the steps below to see how you can do it. &lt;\/p&gt; &lt;h2&gt;How to Point the Subdomain to GitHub&lt;\/h2&gt; &lt;p&gt;  In order to accomplish these steps you will only need access to cPanel.     You also want to note the GitHub's IP addresses you can use:&lt;br\/&gt;&lt;pre class=\"code_block\"&gt;* 192.30.252.153 &lt;br\/&gt;* 192.30.252.154&lt;\/pre&gt; &lt;\/p&gt; &lt;ol class=\"article_list\"&gt; &lt;li&gt;Log into &lt;a href=\"\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\"&gt;cPanel&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;Create a subdomain (or us an existing one)&lt;\/li&gt; &lt;li&gt;Open the &lt;a href=\"\/support\/edu\/cpanel\/advanced-dns-editor-cpanel\/\"&gt;Zone Editor&lt;\/a&gt; in cPanel&lt;\/li&gt; &lt;li&gt;Change your subdomain CNAME to an A Record&lt;\/li&gt; &lt;li&gt;Point the A record to the primary GitHub IP address: 192.30.252.153&lt;\/li&gt; &lt;li&gt;Add another A record for the same subdomain and point it to the secondary GitHub IP address: 192.30.252.154&lt;\/li&gt; &lt;\/ol&gt; &lt;h2&gt;Allow Some Time for Propagation&lt;\/h2&gt; &lt;p&gt;  Now that you have pointed your subdomain to GitHub, you may need to wait a few hours for the records to propagate.      If the site is not resolving after 24 hours you may want to double-check your input to make sure there are no mistakes in copying. \n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You may recall, in a previous article, we explained how you can &lt;a href=&#8221;\/support\/website\/git\/how-to-use-a-custom-domain-with-github-pages\/&#8221;&gt;point a domain to GitHub&lt;\/a&gt; to host a static site. In this article, we&#8217;re going to show you how you can do the same thing but for a subdomain. &lt;\/p&gt; &lt;p&gt; There are many reasons why you might want to use a<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\"> Read More ><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-4442","post","type-post","status-publish","format-standard","hentry","category-domain-names"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Point a Subdomain to GitHub Pages | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article, we&#039;ll show you how you can use a subdomain to connect to GitHub Pages hosted sites.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Point a Subdomain to GitHub Pages | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article, we&#039;ll show you how you can use a subdomain to connect to GitHub Pages hosted sites.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-14T21:20:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T02:28:17+00:00\" \/>\n<meta name=\"author\" content=\"Christopher Maiorana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Maiorana\" \/>\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:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\"},\"author\":{\"name\":\"Christopher Maiorana\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\"},\"headline\":\"How to Point a Subdomain to GitHub Pages\",\"datePublished\":\"2018-03-14T21:20:09+00:00\",\"dateModified\":\"2021-08-17T02:28:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\"},\"wordCount\":8,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Domain Names\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\",\"name\":\"How to Point a Subdomain to GitHub Pages | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2018-03-14T21:20:09+00:00\",\"dateModified\":\"2021-08-17T02:28:17+00:00\",\"description\":\"In this article, we'll show you how you can use a subdomain to connect to GitHub Pages hosted sites.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Point a Subdomain to GitHub Pages\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\",\"name\":\"Christopher Maiorana\",\"description\":\"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Point a Subdomain to GitHub Pages | InMotion Hosting","description":"In this article, we'll show you how you can use a subdomain to connect to GitHub Pages hosted sites.","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:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/","og_locale":"en_US","og_type":"article","og_title":"How to Point a Subdomain to GitHub Pages | InMotion Hosting","og_description":"In this article, we'll show you how you can use a subdomain to connect to GitHub Pages hosted sites.","og_url":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2018-03-14T21:20:09+00:00","article_modified_time":"2021-08-17T02:28:17+00:00","author":"Christopher Maiorana","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Christopher Maiorana","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/"},"author":{"name":"Christopher Maiorana","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f"},"headline":"How to Point a Subdomain to GitHub Pages","datePublished":"2018-03-14T21:20:09+00:00","dateModified":"2021-08-17T02:28:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/"},"wordCount":8,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Domain Names"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/","url":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/","name":"How to Point a Subdomain to GitHub Pages | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2018-03-14T21:20:09+00:00","dateModified":"2021-08-17T02:28:17+00:00","description":"In this article, we'll show you how you can use a subdomain to connect to GitHub Pages hosted sites.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/how-to-point-a-subdomain-to-github-pages\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Point a Subdomain to GitHub Pages"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f","name":"Christopher Maiorana","description":"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.","sameAs":["https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=4442"}],"version-history":[{"count":1,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4442\/revisions"}],"predecessor-version":[{"id":83735,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4442\/revisions\/83735"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}