Github pages with custom CNAME security

Currently accepted answer is partially wrong.

Yes, you are safe as long as you claim domain name first and as long as it is set up in you repository.

But linking CNAME to specific account just does not do anything. It could work in past, but now it is simply broken. Even if you set up CNAME with your account name, anyone can still use your domain if you did not set it up in your repository. You can check my detailed post about this problem here.


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