Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github pages with custom CNAME security

Github allows you to host static pages on your own domain name. The procedure is described here: https://help.github.com/articles/setting-up-a-custom-domain-with-pages

It mentions that you have to create a file called CNAME in your repository to make sure your domain is mapped to this repository.

What would happen if someone else would create a pages repository with your domain name in their CNAME file? Would they be able to hijack your domain this way, or will Github forever associate this domain name with your repository?

like image 871
konrad Avatar asked Apr 03 '14 06:04

konrad


1 Answers

First of all, if you take the CNAME first, you're safe. GitHub Pages will raise an error to anyone who would try to create the same CNAME file. This if a bit frustrating with forking such repository.

On the second hand GH Pages recently added an option to set DNS to a specific account, using CNAME DNS record instead of A like this:

www.example.com   CNAME   username.github.io

Checkout the page you mentioned for more info: https://help.github.com/articles/setting-up-a-custom-domain-with-pages

like image 64
Wojtek Erbetowski Avatar answered Sep 28 '22 06:09

Wojtek Erbetowski