<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Alex Ravenna</title><description>A coder-ready Astro blog theme with 59 of your favorite color schemes to choose from</description><link>https://alexravenna.com</link><item><title>Migrating a Custom Domain for GitHub Pages</title><link>https://alexravenna.com/posts/migrate-github-pages-domain</link><guid isPermaLink="true">https://alexravenna.com/posts/migrate-github-pages-domain</guid><description>How to switch the custom domain of your GitHub Pages website.</description><pubDate>Fri, 11 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I recently decided to switch to &lt;code&gt;alexravenna.com&lt;/code&gt; as the canonical domain for this website.&lt;/p&gt;
&lt;p&gt;I already bought the domain a long time ago (woohoo!), but for some reason had originally decided to have &lt;code&gt;alexravenna.is-a.dev&lt;/code&gt; be the default domain for this site and have every other domain redirect to that.&lt;/p&gt;
&lt;h2&gt;Terminology&lt;/h2&gt;
&lt;p&gt;First, let&apos;s take a quick refresher on the terms behind a URL like https://alexravenna.github.io to avoid confusion later:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;URL Section&lt;/th&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;https&lt;/td&gt;
&lt;td&gt;scheme&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;alexravenna&lt;/td&gt;
&lt;td&gt;subdomain label&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;alexravenna.github.io&lt;/td&gt;
&lt;td&gt;subdomain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;github.io&lt;/td&gt;
&lt;td&gt;apex domain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;io&lt;/td&gt;
&lt;td&gt;top-level domain (TLD)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;GitHub Pages Default Domain Name&lt;/h2&gt;
&lt;p&gt;This website is hosted on &lt;a href=&quot;https://docs.github.com/en/pages&quot;&gt;GitHub Pages&lt;/a&gt;, which automatically gives it the domain &lt;a href=&quot;https://alexravenna.github.io&quot;&gt;alexravenna.github.io&lt;/a&gt;. That domain comes from my GitHub username, &quot;alexravenna&quot;.&lt;/p&gt;
&lt;p&gt;As described in &lt;a href=&quot;https://docs.github.com/en/pages/getting-started-with-github-pages/what-is-github-pages#types-of-github-pages-sites&quot;&gt;the documentation&lt;/a&gt;, the code for a website hosted on GitHub Pages has to be located in a repository of the name&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;GITHUB-USERNAME&amp;gt;.github.io
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for example: &lt;a href=&quot;https://github.com/alexravenna/alexravenna.github.io&quot;&gt;alexravenna.github.io&lt;/a&gt; (click to be taken to the repository). You can only create one such GitHub Pages website per GitHub username.&lt;/p&gt;
&lt;p&gt;I thought that &lt;code&gt;alexravenna.github.io&lt;/code&gt; was too boring, so I decided I&apos;d rather use a custom domain!&lt;/p&gt;
&lt;h2&gt;Custom .is-a.dev Subdomain&lt;/h2&gt;
&lt;p&gt;I stumbled upon the &lt;a href=&quot;https://is-a.dev&quot;&gt;is-a.dev project&lt;/a&gt; at some point, which allows anyone to create a custom subdomain under the &quot;is-a.dev&quot; apex domain for free. Since I&apos;m a software &lt;strong&gt;dev&lt;/strong&gt;eloper, that appealed to me!&lt;/p&gt;
&lt;p&gt;That means that if you follow the &lt;a href=&quot;https://docs.is-a.dev/guides/github-pages/&quot;&gt;registration process for GitHub Pages &lt;/a&gt; - maybe I&apos;ll make a post about that someday, since it was more complicated than I expected - you receive a free domain at&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;GITHUB-USERNAME&amp;gt;.is-a.dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, in order to make &lt;code&gt;alexravenna.is-a.dev&lt;/code&gt; be the final destination for &lt;code&gt;alexravenna.com&lt;/code&gt; too, it was necessary to configure a redirect:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;alexravenna.com -&amp;gt; alexravenna.is-a.dev
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Original Redirect&lt;/h2&gt;
&lt;p&gt;Here&apos;s the original redirect configured in my domain provider, Hostinger:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;domain-provider-redirect-configuration.png&quot; alt=&quot;Screenshot showing the permanent domain redirect configuration from alexravenna.com to https://alexravenna.is-a.dev&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If this were still active, this would mean that inputting &quot;alexravenna.com&quot; into your browser would always automatically take you to &quot;https://alexravenna.is-a.dev&quot; without you having to do anything.&lt;/p&gt;
&lt;h2&gt;Migrating Domains&lt;/h2&gt;
&lt;p&gt;When this post goes live, you should always be redirected to this final URL&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://alexravenna.com/posts/migrate-github-pages-domain
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and not to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://alexravenna.is-a.dev/posts/migrate-github-pages-domain
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How did I achieve that?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, I removed the redirect configuration from my domain provider (see the screenshot above). They informed me:
&lt;img src=&quot;domain-provider-redirect-deletion-notice.png&quot; alt=&quot;Screenshot showing a notice from the domain provider stating &amp;quot;The redirect usually takes 1 hour to work. Sometimes, it can take up to 48 hours.&amp;quot;&quot; /&gt;
However, the removal of the redirect seemed to happen basically immediately. After that &lt;code&gt;alexravenna.com&lt;/code&gt; loaded a default &quot;Parked domain name&quot; page from my domain provider.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next, I updated the GitHub Pages setting for the code repository. That&apos;s where you have to tell GitHub that you&apos;re using a custom domain instead of the default &lt;code&gt;&amp;lt;GITHUB-USERNAME&amp;gt;-github.io&lt;/code&gt; domain.
The previous configuration for the &lt;code&gt;alexravenna.is-a.dev&lt;/code&gt; custom domain looked like this:
&lt;img src=&quot;github-pages-configuration-orig.png&quot; alt=&quot;Screenshot showing the GitHub Pages domain configuration for alexravenna.is-a.dev&quot; /&gt;
I changed the entry under &quot;Custom domain&quot; to &quot;alexravenna.com&quot;:
&lt;img src=&quot;github-pages-configuration-new.png&quot; alt=&quot;Screenshot showing the GitHub Pages domain configuration for alexravenna.is-a.dev&quot; /&gt;
GitHub does a DNS check after you save to make sure the new domain can be resolved.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I adjusted the configuration in code for this website so that Astro can correctly generate links. That was just a one-line change to &lt;code&gt;site.config.ts&lt;/code&gt; - see &lt;a href=&quot;https://github.com/alexravenna/alexravenna.github.io/commit/645850426124604d3444b1338bb382d5742dd561&quot;&gt;this commit&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I re-deployed the website:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I created a &lt;a href=&quot;https://github.com/alexravenna/alexravenna.github.io/pull/65&quot;&gt;pull request for the code changes&lt;/a&gt; as part of my standard release flow&lt;/li&gt;
&lt;li&gt;I merged it to &lt;code&gt;main&lt;/code&gt;, which kicks off the &lt;a href=&quot;https://github.com/alexravenna/alexravenna.github.io/actions/workflows/astro.yml&quot;&gt;&quot;deploy&quot; GitHub Action&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I crossed my fingers and hoped that everything would work in the end!&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Update #1: Verify the &quot;New&quot; Custom Domain&lt;/h2&gt;
&lt;p&gt;Hah! Of course not everything worked :laughing:. After waiting a little, I noticed that the &quot;Parked domain page&quot; for &lt;code&gt;alexravenna.com&lt;/code&gt; was still there and that the GitHub Pages configuration started giving me an DNS check error:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-pages-configuration-dns-check-unsuccessful.png&quot; alt=&quot;Screenshot showing the GitHub Pages domain configuration showing &amp;quot;DNS check unsuccessful&amp;quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I had forgotten something: to verify the &quot;new&quot; custom domain &lt;code&gt;alexravenna.com&lt;/code&gt; with GitHub Pages! This is necessary whenever you want to use a custom domain for GitHub pages; I did it when I originally set up &lt;code&gt;alexravenna.is-a.dev&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Start Verifying Custom Domain&lt;/h3&gt;
&lt;p&gt;In order to verify domains, you have to go to your GitHub account settings (&lt;strong&gt;NOT&lt;/strong&gt; the settings for the repository where your website code is) and then to the &lt;a href=&quot;https://github.com/settings/pages&quot;&gt;Pages settings&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-settings-pages.png&quot; alt=&quot;Screenshot showing the GitHub user account settings page for GitHub Pages&quot; /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, &lt;code&gt;alexravenna.is-a.dev&lt;/code&gt; is in the list, but &lt;code&gt;alexravenna.com&lt;/code&gt; is not! Let&apos;s change that by clicking on &quot;Add a domain&quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-settings-pages-new-domain.png&quot; alt=&quot;Screenshot showing adding &amp;quot;alexravenna.com&amp;quot; as a verified domain&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Then you are asked to make some changes in your DNS configuration:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-settings-pages-dns-txt-record.png&quot; alt=&quot;Screenshot showing steps for adding a DNS TXT record&quot; /&gt;&lt;/p&gt;
&lt;p&gt;These steps are (ignore the red redaction I made, these values are published publically, I just didn&apos;t know that at the time):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a TXT record in your DNS configuration for the following hostname: &lt;code&gt;_github-pages-challenge-alexravenna&lt;/code&gt;.alexravenna.com&lt;/li&gt;
&lt;li&gt;Use this code for the value of the TXT record: &lt;code&gt;f7ab6bae7659743478f7ab26089473&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Wait until your DNS configuration changes. This could take up to 24 hours to propagate.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Create DNS TXT Record&lt;/h3&gt;
&lt;p&gt;Thankfully when I &lt;a href=&quot;#original-redirect&quot;&gt;deleted the previous redirect&lt;/a&gt; I had seen a page in my domain provider account that should be just what I need:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;domain-provider-manage-dns-records.png&quot; alt=&quot;Screenshot showing domain provider settings for DNS records&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I entered the values as provided by GitHub and added the record:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;domain-provider-dns-txt-record.png&quot; alt=&quot;Screenshot showing the entry of data for a DNS TXT record&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I went back over to GitHub and clicked &quot;Verify&quot; and was thankfully greeted with a successful notification:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-settings-pages-verification-successful.png&quot; alt=&quot;Screenshot showing that alexravenna.com was successfully verified&quot; /&gt;&lt;/p&gt;
&lt;p&gt;But still no luck! The &quot;parked domain page&quot; still showed for &lt;code&gt;alexravenna.com&lt;/code&gt; and GitHub Pages still gave me the same error.&lt;/p&gt;
&lt;h2&gt;Update #2: Update Additional DNS Records&lt;/h2&gt;
&lt;p&gt;After doing some research I came back smarter. The problem was with the DNS records still present with my domain provider:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;domain-provider-dns-records.png&quot; alt=&quot;Screenshot showing DNS records at the domain provider&quot; /&gt;&lt;/p&gt;
&lt;p&gt;These two &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;AAAA&lt;/code&gt; records point DNS to the IPv4 and IPv6 addresses of my domain provider, Hostinger. That&apos;s why navigating to &lt;code&gt;alexravenna.com&lt;/code&gt; currently loads the &quot;parked domain page&quot; from them. A DNS lookup at &lt;a href=&quot;https://www.whatsmydns.net/#A/alexravenna.com&quot;&gt;whatsmydns.net&lt;/a&gt; confirmed that &lt;code&gt;alexravenna.com&lt;/code&gt; only points to Hostinger, &lt;em&gt;not&lt;/em&gt; GitHub Pages.&lt;/p&gt;
&lt;p&gt;I had to tell Hostinger to forward requests to &lt;code&gt;alexravenna.com&lt;/code&gt; to the GitHub IP addresses as described at &lt;a href=&quot;https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain&quot;&gt;Configuring an apex domain&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;185.199.108.153&lt;/li&gt;
&lt;li&gt;185.199.109.153&lt;/li&gt;
&lt;li&gt;185.199.110.153&lt;/li&gt;
&lt;li&gt;185.199.111.153&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This sounds like it will work! So I deleted the A and AAAA records for Hostinger and added the A records for GitHub Pages:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;domain-provider-dns-additional-records.png&quot; alt=&quot;Screenshot showing multiple DNS records&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Maybe I&apos;ll add the AAAA (IPv6) records at some point, but I don&apos;t think those will matter for awhile.&lt;/p&gt;
&lt;h3&gt;DNS Propagation&lt;/h3&gt;
&lt;p&gt;A new check of whatsmydns.net showed me that DNS propagation was already taking place and resolving the GitHub Pages IP addresses instead of Hostinger&apos;s:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;whatsmydns-alexravenna.png&quot; alt=&quot;Screenshot showing whatsmydns.net results for alexravenna.com A record&quot; /&gt;&lt;/p&gt;
&lt;p&gt;It can only be a matter of time! GitHub showed me for a long time that the DNS check was in progress, which made me somewhat anxious:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-pages-configuration-dns-check-in-progress.png&quot; alt=&quot;Screenshot showing GitHub Pages settings that &amp;quot;DNS Check in Progress&amp;quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;At long last, it was successful!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-pages-configuration-dns-check-successful.png&quot; alt=&quot;Screenshot showing GitHub Pages settings with successful DNS check but no HTTPS possible&quot; /&gt;&lt;/p&gt;
&lt;p&gt;However, HTTPS enforcement wasn&apos;t possible for some reason, which is a big no-go nowadays. So the website was theoretically accessible in the browser, but only with a very big warning that the website was not secure. Not good!&lt;/p&gt;
&lt;p&gt;Hm. Well, the GitHub Pages documentation does say that it may take up to 24 hours for the HTTPS enforcement option to be available...I&apos;ll give it some time.&lt;/p&gt;
&lt;h2&gt;Update #3: Good Things Come to Those Who Wait&lt;/h2&gt;
&lt;p&gt;When I checked four hours later, things looked much better! DNS propagation according to whatsmydns.net was almost fully complete (two locations were red, but no locations still showed the Hostinger IP address):&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;whatsmydns-alexravenna-later.png&quot; alt=&quot;Screenshot showing uniform whatsmydns.net results&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And GitHub Pages allowed me to enforce HTTPS, so of course I did:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;github-pages-configuration-enforce-https.png&quot; alt=&quot;Screenshot showing a GitHub Pages settings with &amp;quot;Enforce HTTPS&amp;quot; activated&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Success! :tada:&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now you can browse &lt;a href=&quot;https://alexravenna.com&quot;&gt;alexravenna.com&lt;/a&gt; and read this first post :grin:.&lt;/p&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/pages&quot;&gt;GitHub Pages documentation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Especially &lt;a href=&quot;https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages&quot;&gt;About custom domains and GitHub Pages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://is-a.dev&quot;&gt;is-a.dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.whatsmydns.net&quot;&gt;whatsmydns&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><author>Alex Ravenna</author></item></channel></rss>