<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cloudflare Pages on Mozabre As Idle Moments</title><link>https://mitz17.com/en/tags/cloudflare-pages/</link><description>Recent content in Cloudflare Pages on Mozabre As Idle Moments</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Wed, 30 Sep 2026 19:00:00 +0900</lastBuildDate><atom:link href="https://mitz17.com/en/tags/cloudflare-pages/index.xml" rel="self" type="application/rss+xml"/><item><title>[With Screenshots] How to Migrate Your Blog Hosting from GitHub Pages to Cloudflare Pages</title><link>https://mitz17.com/en/blog/github-pages-to-cloudflare-pages/</link><pubDate>Wed, 30 Sep 2026 19:00:00 +0900</pubDate><guid>https://mitz17.com/en/blog/github-pages-to-cloudflare-pages/</guid><description>&lt;h2 id="table-of-contents"&gt;Table of Contents&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;a class="link" href="#who-this-article-is-for" &gt;Who This Article Is For&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#why-move-away-from-github-pages" &gt;Why Move Away from GitHub Pages?&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#github-pages-vs-cloudflare-pages" &gt;GitHub Pages vs. Cloudflare Pages&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#before-you-migrate" &gt;Before You Migrate&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#1-create-a-new-application-from-workers--pages" &gt;1. Create a New Application from Workers &amp;amp; Pages&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#2-connect-your-github-repository" &gt;2. Connect Your GitHub Repository&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#3-enter-the-hugo-build-settings" &gt;3. Enter the Hugo Build Settings&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#4-check-the-site-on-pagesdev" &gt;4. Check the Site on &lt;code&gt;pages.dev&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#5-add-your-custom-domain" &gt;5. Add Your Custom Domain&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#clean-up-the-old-github-pages-setup" &gt;Clean Up the Old GitHub Pages Setup&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#6-make-the-github-repository-private" &gt;6. Make the GitHub Repository Private&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#7-redirect-pagesdev-traffic-to-your-custom-domain" &gt;7. Redirect &lt;code&gt;pages.dev&lt;/code&gt; Traffic to Your Custom Domain&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="#closing" &gt;Closing&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="who-this-article-is-for"&gt;Who This Article Is For&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;People who keep their blog source in a GitHub repository&lt;/li&gt;&#10;&lt;li&gt;People publishing a Hugo blog or static site on GitHub Pages&lt;/li&gt;&#10;&lt;li&gt;People torn between GitHub Pages and Cloudflare Pages for hosting their blog&lt;/li&gt;&#10;&lt;li&gt;People who want to move their blog hosting from GitHub Pages to Cloudflare Pages&lt;/li&gt;&#10;&lt;li&gt;People (with a custom domain) who want to publish a blog for free&lt;/li&gt;&#10;&lt;li&gt;People who registered their domain with Cloudflare and manage it with Cloudflare DNS&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p style="text-align: center;"&gt;&#10; &lt;img src="github-pages-cloudflare-pages-migration-comparison.png" alt="Architecture diagram before and after migrating from GitHub Pages to Cloudflare Pages" width="640"&gt;&#10;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 1: Architecture before and after migrating from GitHub Pages to Cloudflare Pages&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Before the migration, GitHub handles source control, building, and publishing all by itself. After the migration, GitHub is limited to private source control, and Cloudflare Pages handles the Hugo build and publishing.&#10;The custom domain stays the same, so the URLs your readers use remain unchanged.&lt;/p&gt;&#10;&lt;p&gt;The screens, pricing, and plans shown in this article may change. Please check the official documentation as well when you try this yourself.&lt;/p&gt;&#10;&lt;p&gt;The screenshots in this article were taken with the Cloudflare dashboard set to Japanese. Button and menu names in the English UI may differ slightly from the labels used here.&lt;/p&gt;&#10;&lt;h2 id="why-move-away-from-github-pages"&gt;Why Move Away from GitHub Pages?&#10;&lt;/h2&gt;&lt;p&gt;GitHub Pages makes it easy to publish a static site managed on GitHub. It supports custom domains and HTTPS, so it&amp;rsquo;s perfectly convenient as a place to host a Hugo blog.&lt;/p&gt;&#10;&lt;p&gt;However, a blog repository contains more than just posts: Hugo configuration, themes, layouts, build settings, and so on.&lt;/p&gt;&#10;&lt;p&gt;And to use GitHub Pages for free, the repository has to be public.&#10;If a secret image or something similar ever slipped into the source repository by accident, it would be game over.&lt;/p&gt;&#10;&lt;p&gt;So I went looking for a host that would publish pages from a private repository for free. The answer: Cloudflare Pages.&lt;/p&gt;&#10;&lt;h2 id="github-pages-vs-cloudflare-pages"&gt;GitHub Pages vs. Cloudflare Pages&#10;&lt;/h2&gt;&lt;table style="display: table; width: fit-content !important; max-width: 100%; margin: 0 auto;"&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;GitHub Pages&lt;/th&gt;&lt;th&gt;Cloudflare Pages&lt;/th&gt;&lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&lt;td&gt;Cost&lt;/td&gt;&lt;td&gt;Free (GitHub Free)&lt;/td&gt;&lt;td&gt;Free&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Source control&lt;/td&gt;&lt;td&gt;GitHub&lt;/td&gt;&lt;td&gt;GitHub&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;GitHub integration&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Private repositories&lt;/td&gt;&lt;td&gt;Public repositories only on GitHub Free&lt;/td&gt;&lt;td&gt;✓&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Builds&lt;/td&gt;&lt;td&gt;Automated with GitHub Actions&lt;/td&gt;&lt;td&gt;Automated from the dashboard&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Build limit on the free plan&lt;/td&gt;&lt;td&gt;None (when using Actions)&lt;/td&gt;&lt;td&gt;500 per month&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Published site size&lt;/td&gt;&lt;td&gt;Up to 1 GB&lt;/td&gt;&lt;td&gt;Up to 20,000 files&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Per-file limit&lt;/td&gt;&lt;td&gt;About 105 MB&lt;/td&gt;&lt;td&gt;About 26 MB&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Custom domain&lt;/td&gt;&lt;td&gt;✓ (optional)&lt;/td&gt;&lt;td&gt;✓ (optional)&lt;/td&gt;&lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Managing the source on GitHub and building and publishing with GitHub Pages is a simple, easy-to-understand setup.&#10;On the other hand, if you want automatic deployments from a private repository, Cloudflare Pages is the better choice.&#10;For that reason, I decided to move to Cloudflare Pages, which supports private repositories.&#10;Well, to be fair, if something slips into &lt;code&gt;static/&lt;/code&gt; or a page bundle, it gets published even with a private repo&amp;hellip;&lt;/p&gt;&#10;&lt;h2 id="before-you-migrate"&gt;Before You Migrate&#10;&lt;/h2&gt;&lt;p&gt;Don&amp;rsquo;t shut down GitHub Pages first. Publish the site on Cloudflare Pages, check it at the &lt;code&gt;pages.dev&lt;/code&gt; URL, and only then switch your custom domain. In this order, even if the build or DNS settings go wrong, you can fix things while your live site keeps running.&lt;/p&gt;&#10;&lt;p&gt;Before you start, write down the following:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The branch and deployment method you use for GitHub Pages&lt;/li&gt;&#10;&lt;li&gt;Your Hugo version, build command, and output directory&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The steps in this article go in this order:&#10;&lt;strong&gt;Create the Cloudflare Pages project → Connect the GitHub repository → Configure the Hugo build → Check the site on &lt;code&gt;pages.dev&lt;/code&gt; → Set up the custom domain → Clean up the GitHub Pages DNS records and workflow → Make the repository private → Redirect &lt;code&gt;pages.dev&lt;/code&gt; to the custom domain&lt;/strong&gt;&lt;/p&gt;&#10;&lt;h2 id="create-the-cloudflare-pages-project"&gt;Create the Cloudflare Pages Project&#10;&lt;/h2&gt;&lt;h3 id="1-create-a-new-application-from-workers--pages"&gt;1. Create a New Application from Workers &amp;amp; Pages&#10;&lt;/h3&gt;&lt;p&gt;In the Cloudflare dashboard, open &lt;strong&gt;Workers &amp;amp; Pages&lt;/strong&gt; and select &lt;strong&gt;Create application&lt;/strong&gt; in the upper right.&lt;br&gt;&#10;Then press the &lt;strong&gt;Get started&lt;/strong&gt; button.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-workers-pages-dashboard.png" alt="Initial Cloudflare Workers &amp; Pages screen showing the button to create an application" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 2: Create an application from Workers &amp; Pages&lt;/small&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-get-started.png" alt="Screen showing the link to get started with Cloudflare Pages" width="560"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 3: Get started with Pages&lt;/small&gt;&lt;/p&gt;&#10;&lt;h3 id="2-connect-your-github-repository"&gt;2. Connect Your GitHub Repository&#10;&lt;/h3&gt;&lt;p&gt;Next, select &lt;strong&gt;Import an existing Git repository&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-import-git-repository.png" alt="Screen showing the button to import an existing Git repository" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 4: Import an existing Git repository&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Sign in to your GitHub account, select the target repository, and press &lt;strong&gt;Begin setup&lt;/strong&gt;.&lt;br&gt;&#10;When authorizing on GitHub, granting the Cloudflare Workers &amp;amp; Pages GitHub App access to only this blog&amp;rsquo;s repository makes things easier to manage.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-select-github-repository.png" alt="Screen for selecting the GitHub account and repository and starting setup" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 5: Select the GitHub repository&lt;/small&gt;&lt;/p&gt;&#10;&lt;h2 id="hugo-build-settings"&gt;Hugo Build Settings&#10;&lt;/h2&gt;&lt;h3 id="3-enter-the-hugo-build-settings"&gt;3. Enter the Hugo Build Settings&#10;&lt;/h3&gt;&lt;p&gt;For a typical Hugo site, the settings are as follows.&lt;/p&gt;&#10;&lt;table style="display: table; width: fit-content !important; max-width: 100%; margin: 0 auto;"&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&lt;th&gt;Setting&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&lt;td&gt;Production branch&lt;/td&gt;&lt;td&gt;&lt;code&gt;main&lt;/code&gt; (match the branch you currently publish from)&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Framework preset&lt;/td&gt;&lt;td&gt;Hugo&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Build command&lt;/td&gt;&lt;td&gt;&lt;code&gt;hugo --gc --minify&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Build output directory&lt;/td&gt;&lt;td&gt;&lt;code&gt;public&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;For this site, I set the build command to &lt;code&gt;hugo --gc --minify&lt;/code&gt; as shown in the screenshot. &lt;code&gt;--gc&lt;/code&gt; cleans up cache files that are no longer needed, and &lt;code&gt;--minify&lt;/code&gt; compresses the generated HTML, CSS, and JavaScript. The output directory is &lt;code&gt;public&lt;/code&gt;. See also &lt;a class="link" href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/" target="_blank" rel="noopener"&#10; &gt;Cloudflare&amp;rsquo;s Hugo guide&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-hugo-build-settings.png" alt="Screen for configuring the Hugo build settings and HUGO_VERSION in Cloudflare Pages" width="620"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 6: Hugo build settings&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;If you want to pin the Hugo version you use, add &lt;code&gt;HUGO_VERSION&lt;/code&gt; to the project&amp;rsquo;s environment variables. If the versions differ between your local machine and CI, themes or Markdown may render differently, so setting it is a safe bet if you value reproducibility. Note that production and preview environments have separate environment variable settings. If you also use preview deployments, make sure &lt;code&gt;HUGO_VERSION&lt;/code&gt; is set for the Preview environment as well (check under the project&amp;rsquo;s settings), and add it there if it&amp;rsquo;s missing.&lt;/p&gt;&#10;&lt;h2 id="first-deployment-and-verification"&gt;First Deployment and Verification&#10;&lt;/h2&gt;&lt;h3 id="4-check-the-site-on-pagesdev"&gt;4. Check the Site on &lt;code&gt;pages.dev&lt;/code&gt;&#10;&lt;/h3&gt;&lt;p&gt;When you choose to deploy, Cloudflare Pages fetches the repository, runs Hugo, and serves &lt;code&gt;public/&lt;/code&gt;. When it finishes, you&amp;rsquo;ll see the screen below and get a URL in the form &lt;code&gt;https://&amp;lt;project&amp;gt;.pages.dev&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Once the deployment success screen appears, open the issued &lt;code&gt;pages.dev&lt;/code&gt; URL and check the site. Don&amp;rsquo;t switch the custom domain yet.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-deployment-success.png" alt="Cloudflare Pages deployment success screen" width="620"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 7: First deployment complete&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Before switching to my custom domain, I confirmed the site displayed correctly at this URL.&lt;/p&gt;&#10;&lt;h2 id="switch-your-custom-domain-to-cloudflare-pages"&gt;Switch Your Custom Domain to Cloudflare Pages&#10;&lt;/h2&gt;&lt;h3 id="5-add-your-custom-domain"&gt;5. Add Your Custom Domain&#10;&lt;/h3&gt;&lt;p&gt;If everything looks fine on &lt;code&gt;pages.dev&lt;/code&gt;, add your custom domain from the Pages project&amp;rsquo;s &lt;strong&gt;Custom domains&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;On the project screen, open the &lt;strong&gt;Custom domains&lt;/strong&gt; tab. Then select &lt;strong&gt;Set up a custom domain&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-custom-domain-tab.png" alt="Custom domains tab of the Cloudflare Pages project" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 8: Open the Custom domains tab&lt;/small&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-custom-domain-start.png" alt="Screen showing the button to set up a custom domain" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 9: Start setting up the custom domain&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Enter your registered domain and select &lt;strong&gt;Continue&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-custom-domain-input.png" alt="Screen for entering a custom domain in Cloudflare Pages" width="620"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 10: Enter your custom domain&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;If your DNS is managed by Cloudflare, review the DNS record shown and select &lt;strong&gt;Activate domain&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-custom-domain-dns-record.png" alt="Screen for reviewing the DNS record proposed by Cloudflare Pages" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 11: Review the DNS record and activate the domain&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;If your domain&amp;rsquo;s DNS is managed by Cloudflare, follow the prompts to set up the DNS record for Pages.&lt;/p&gt;&#10;&lt;p&gt;Right after setup, the status shows &lt;strong&gt;Initializing&lt;/strong&gt;. Wait until DNS and certificate processing finish. The screen says it can take up to 48 hours to take effect, but in my case, after waiting about a minute and reloading the page, the status changed to &lt;strong&gt;Active&lt;/strong&gt;. Once SSL is enabled, you&amp;rsquo;re done.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-custom-domain-initializing.png" alt="Screen showing the Cloudflare Pages custom domain initializing" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 12: Custom domain initializing&lt;/small&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-pages-custom-domain-active.png" alt="Screen showing the Cloudflare Pages custom domain active" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 13: Custom domain setup complete&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Once the switch is complete, your site should probably be showing up at &lt;code&gt;https://your-domain/&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="clean-up-the-old-github-pages-setup"&gt;Clean Up the Old GitHub Pages Setup&#10;&lt;/h2&gt;&lt;p&gt;After confirming that the site displays correctly on your custom domain via Cloudflare Pages, tidy up the old GitHub Pages settings. If you stop GitHub Pages or delete DNS records first, the site may become temporarily unreachable, so do this only after confirming the site is live on Cloudflare.&lt;/p&gt;&#10;&lt;h3 id="delete-old-dns-records"&gt;Delete Old DNS Records&#10;&lt;/h3&gt;&lt;p&gt;In your DNS dashboard, check for any leftover records pointing to GitHub Pages. These are especially easy to miss:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A records pointing to GitHub Pages IP addresses such as &lt;code&gt;185.199.108.153&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;CNAME records pointing to &lt;code&gt;&amp;lt;username&amp;gt;.github.io&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;GitHub Pages A/CNAME records left on subdomains such as &lt;code&gt;www&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;After confirming that the Cloudflare Pages record is working correctly, delete only the unneeded GitHub Pages records. Compare each record&amp;rsquo;s target one by one so you don&amp;rsquo;t delete the Cloudflare Pages record.&lt;/p&gt;&#10;&lt;h3 id="delete-the-github-actions-pages-workflow"&gt;Delete the GitHub Actions Pages Workflow&#10;&lt;/h3&gt;&lt;p&gt;If you built and published with GitHub Actions for GitHub Pages, the Pages workflow in &lt;code&gt;.github/workflows/&lt;/code&gt; is no longer needed. If you leave it and make the repository private, a failing workflow will run on every push and eat into your Actions quota.&lt;/p&gt;&#10;&lt;p&gt;Delete and commit only the workflow you&amp;rsquo;ve confirmed is for Pages. Be careful not to delete other CI workflows by mistake.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git rm .github/workflows/&amp;lt;github-pages-workflow&amp;gt;.yml&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git commit -m &lt;span class="s2"&gt;&amp;#34;Remove GitHub Pages workflow&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git push&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="make-the-repository-private"&gt;Make the Repository Private&#10;&lt;/h2&gt;&lt;h3 id="6-make-the-github-repository-private"&gt;6. Make the GitHub Repository Private&#10;&lt;/h3&gt;&lt;p&gt;Once you&amp;rsquo;ve confirmed the site displays correctly on your custom domain, change the repository&amp;rsquo;s Visibility to Private in the GitHub repository settings.&lt;/p&gt;&#10;&lt;p&gt;Fellow Free-plan users probably can&amp;rsquo;t use GitHub Pages with a private repository anyway, but check that GitHub Pages is turned OFF just in case.&lt;/p&gt;&#10;&lt;p&gt;After the change, actually edit something small, such as a post, push it, and confirm that a new build runs in the Cloudflare Pages deployment list. To avoid accidentally adding secrets or unrelated files, check your changes with &lt;code&gt;git status&lt;/code&gt; first.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git status&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Add only the files you edited&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git add content/blog/&amp;lt;edited-post&amp;gt;/index.md&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git commit -m &lt;span class="s2"&gt;&amp;#34;Verify Cloudflare Pages deployment&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git push&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the new deployment succeeds on Cloudflare Pages and your edit appears on the site, automatic deployment after going private is working correctly.&lt;/p&gt;&#10;&lt;h2 id="redirect-pagesdev-to-your-custom-domain"&gt;Redirect pages.dev to Your Custom Domain&#10;&lt;/h2&gt;&lt;h3 id="7-redirect-pagesdev-traffic-to-your-custom-domain"&gt;7. Redirect &lt;code&gt;pages.dev&lt;/code&gt; Traffic to Your Custom Domain&#10;&lt;/h3&gt;&lt;p&gt;On Cloudflare Pages, the site is still reachable at &lt;code&gt;&amp;lt;project-name&amp;gt;.pages.dev&lt;/code&gt; even after you set up a custom domain. To keep search engines and readers from using multiple URLs, redirecting &lt;code&gt;pages.dev&lt;/code&gt; traffic to your custom domain is just sexier, right?&lt;/p&gt;&#10;&lt;p&gt;Here, I&amp;rsquo;ll use Cloudflare&amp;rsquo;s &lt;strong&gt;Bulk Redirects&lt;/strong&gt; to set up a redirect from &lt;code&gt;document-6eg.pages.dev&lt;/code&gt; to &lt;code&gt;https://mitz17.com&lt;/code&gt; as an example. Replace these with your own project name and domain. Please take care not to redirect your site to mitz17.com. (Not that I&amp;rsquo;d mind.)&lt;/p&gt;&#10;&lt;h3 id="7-1-create-a-bulk-redirect-list"&gt;7-1. Create a Bulk Redirect List&#10;&lt;/h3&gt;&lt;p&gt;On your Cloudflare account screen, open &lt;strong&gt;Bulk Redirects&lt;/strong&gt; (under the delivery and performance section of the sidebar). Select &lt;strong&gt;Create&lt;/strong&gt; in the upper right.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-bulk-redirects-create-list.png" alt="Cloudflare Bulk Redirects screen showing the Create button" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 14: Create a bulk redirect list&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Enter a list name. Here I used &lt;code&gt;pages_dev_redirect&lt;/code&gt;. Any name that&amp;rsquo;s easy to manage is fine. After entering it, select &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-bulk-redirects-name-list.png" alt="Screen for entering the Cloudflare bulk redirect list name" width="520"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 15: Name the redirect list&lt;/small&gt;&lt;/p&gt;&#10;&lt;h3 id="7-2-register-the-redirect-from-pagesdev-to-your-custom-domain"&gt;7-2. Register the Redirect from &lt;code&gt;pages.dev&lt;/code&gt; to Your Custom Domain&#10;&lt;/h3&gt;&lt;p&gt;Open &lt;strong&gt;Or, manually add URL redirects&lt;/strong&gt; and enter the following.&#10;Replace the source and target URLs to match your own environment.&lt;/p&gt;&#10;&lt;table style="display: table; width: fit-content !important; max-width: 100%; margin: 0 auto;"&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&lt;td&gt;Source URL&lt;/td&gt;&lt;td&gt;&lt;code&gt;document-6eg.pages.dev&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Target URL&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://mitz17.com&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#10; &lt;tr&gt;&lt;td&gt;Status&lt;/td&gt;&lt;td&gt;&lt;code&gt;301 - Permanent Redirect&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;As in the screenshot, check &lt;strong&gt;Include subdomains&lt;/strong&gt; if you also want subdomains to be redirected.&#10;Feel free to check any of the other options as well.&lt;br&gt;&#10;After entering everything, select &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-bulk-redirects-add-pages-dev-redirect.png" alt="Screen for adding a 301 redirect from pages.dev to the custom domain" width="720"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 16: Register the redirect target&lt;/small&gt;&lt;/p&gt;&#10;&lt;h3 id="7-3-enable-the-redirect-rule"&gt;7-3. Enable the Redirect Rule&#10;&lt;/h3&gt;&lt;p&gt;Creating the list alone doesn&amp;rsquo;t make the redirect work. On the completion screen, select &lt;strong&gt;Proceed to redirect rules&lt;/strong&gt; and link the list you created to a rule.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-bulk-redirects-open-rule-setup.png" alt="Screen for proceeding to the Cloudflare redirect rule settings" width="520"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 17: Proceed to the redirect rule settings&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;Enter a rule name and select the &lt;code&gt;pages_dev_redirect&lt;/code&gt; list you just created as the redirect list. Finally, select &lt;strong&gt;Save and Deploy&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;img src="cloudflare-bulk-redirects-deploy-rule.png" alt="Screen for saving and deploying a bulk redirect rule in Cloudflare" width="520"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: center;"&gt;&lt;small&gt;Figure 18: Deploy the redirect rule&lt;/small&gt;&lt;/p&gt;&#10;&lt;p&gt;After setting it up, visit &lt;code&gt;https://document-6eg.pages.dev&lt;/code&gt; and confirm that it 301-redirects to &lt;code&gt;https://mitz17.com&lt;/code&gt;. Your browser cache may interfere, so checking in a private window or with &lt;code&gt;curl -I&lt;/code&gt; is the most reliable way.&lt;/p&gt;&#10;&lt;h2 id="closing"&gt;Closing&#10;&lt;/h2&gt;&lt;p&gt;I sincerely hope this improves your QOBL (Quality of Blog Life).&lt;/p&gt;&#10;</description></item></channel></rss>