将 Github 个主页重定向到自定义主页

Redirect Github homepage to custom homepage

我曾经在 username.github.io 上托管我的网页。

我现在已经在 username.com 上建立了一个新网页,与 username.github.io 无关。

但是,我想将 username.github.io 重定向到 username.com
截至目前,如果有人输入 username.github.io,它会将您带到 404 未找到页面。

我可以将它重新路由到 username.com 吗?

正常流程是将您当前的 GitHub 页重定向到 use a custom domain

,而不是重定向

你找到一个better illustration of that process here

  • Go to your GitHub Pages site’s repository settings.
    Under “Custom domain”, add or remove your custom domain and click “Save”.
  • Setting “custom domain” creates a file named CNAME in the same repository.
    Don’t delete it.

OP sidv adds :

After setting up my website (deployed elsewhere) and the DNS servers, I was unable to open the webpage on Safari and Firefox (only on Chrome).

Finding the load balancing IP and configuring it as an A record ended up redirecting the webpage appropriately.