Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subdomain of website for Github pages project

I have a Github project, github.com/jeti/matrix, and I set up a "Github pages" site for the project so that it is accessible here jeti.github.io/matrix/.

That is all configurable through Github.

Now, I would like to add a subdomain of my personal website so that the website is accessible via the subdomain matrix.jeti.io of my website jeti.io.

I am just really confused how to do that because the documentation don't seem to show how to redirect a project page to a subdomain. I have tried a few permutations of what I think should be the correct inputs, but because these DNS changes take so long to propagate, it is really hard to test.

Specifically, I would like to know what value to enter into Github as the Custom domain (it seems to me that this should simply be the subdomain matrix.jeti.io, but I am not sure, so I have left this blank):

enter image description here

Then I also need to create the subdomain. I bought the domain through OVH, and they provide a few options for adding a DNS entry:

enter image description here

My understanding is that I need to add 2 apex records. I did that already:

enter image description here

What is unclear to me is whether I also need to add a CNAME entry. This is what the form looks like when I try to add a CNAME entry:

enter image description here

So in recap:

  1. I did not specify the Custom Domain on the Github site.
  2. I created the 2 apex records shown above.
  3. I did not create a CNAME entry.

Please tell me which of these steps needs to be changed and how to modify it.

like image 473
bremen_matt Avatar asked Sep 27 '17 19:09

bremen_matt


People also ask

Can a website be a subdomain?

The most commonly used and created subdomain is the www subdomain. Almost every website on the internet uses this subdomain, primarily because in the early days of the worldwide web, this subdomain was used to distinguish between web services and other services (like ftp or email) that might be hosted on a domain name.

Can you use your own domain with GitHub Pages?

On GitHub, navigate to your site's repository. Under your repository name, click Settings. In the "Code and automation" section of the sidebar, click Pages. Under "Custom domain", type your custom domain, then click Save.

Can you have more than one website on GitHub Pages?

You can only create one user or organization site for each account on GitHub. Project sites, whether owned by an organization or a personal account, are unlimited.

How do I set up a www subdomain in GitHub Pages?

When using an apex domain, we recommend configuring your GitHub Pages site to host content at both the apex domain and that domain's www subdomain variant. To set up a www subdomain alongside the apex domain, you must first configure an apex domain by creating an ALIAS, ANAME, or A record with your DNS provider.

What types of domains does GitHub Pages work with?

GitHub Pages works with two types of domains: subdomains and apex domains. For a list of unsupported custom domains, see " Troubleshooting custom domains and GitHub Pages ." You can set up either or both of apex and www subdomain configurations for your site.

What is a project site on GitHub Pages?

These are called Project Sites because any project (repository) you create can have a website with this URL. If you want to use your own custom URL, you can purchase a domain name (I use Namecheap and pay about $10/year) and follow GitHub’s documentation on connecting your custom domain to your GitHub Pages website.

How do I add a custom domain to my GitHub page?

On GitHub, navigate to your site's repository. Under your repository name, click Settings. In the left sidebar, click Pages. Under "Custom domain", type your custom domain, then click Save. This will create a commit that adds a CNAME file in the root of your publishing source.


1 Answers

After more trial and error, the answer seems to be

  1. The Github custom domain should indeed be matrix.jeti.io enter image description here

  2. I did not need the apex records. In fact, Github emailed me discouraging it. So I deleted the apex records.

  3. In OVH, I added a DNS CNAME entry like this:

enter image description here

The thing that was confusing me is that I thought that the CNAME entry needed to have a link to the original Github pages WITH the project name jeti.github.io/matrix. That was wrong. The target is simply jeti.github.io. (Note the period on the end).

like image 108
bremen_matt Avatar answered Oct 07 '22 17:10

bremen_matt