by John M Costa, III

How do I setup multi-domain GitHub pages?

Credit goes to this Stack Overflow answer, but note, not the accepted answer it’s the one currently below.

  1. Create an extra repository for your domain. I used the name of the domain as the repository name. See

  2. Create an index.html file in the root of the project.

<!DOCTYPE html>
    <meta charset="utf-8">
    <title>Redirecting to</title>
    <meta http-equiv="refresh" content="0; URL=">

  <link rel="canonical" href="">
  1. Create a CNAME file in the root of the project.
  1. Setup the DNS for the domain to point to the GitHub pages servers. See this write up for how it should look:
comments powered by Disqus