Github pages show "CNAME is already taken" although it is not.

I want to host the repository on github pages and use the custom subdomain I added a CNAME record for in my domain’s DNS settings, but when I tried to add a CNAME record for the subdomain in the respository, it shows: The CNAME is already taken. There are no other repositories using this CNAME currently, so I can’t figure out the problem. Please help.


Hey @thesagniksaha, it looks like this got resolved, is there any suggestions you can write up for folks with the same issue you had? Thanks! 

1 Like

The problem that happened here was a case of subdomain takeover, and is a serious issue. If you create a subdomain CNAME record in your domain’s DNS settings that points to a github username and don’t update the custom domain address in your repository’s  Settings > GitHub Pages within a stipulated amount of time, your subdomain could be taken over by someone else, and if you try to add that subdomain to a repository later, it will show that “The CNAME is already taken”.

Patrik has written a lot about subdomain takeovers in his blog here:

Hope this was useful.

Were you able to resolve the takeover? How did you determine that it had been taken over in the first place?

I have the same issue yet to be resolved.

Got the same error as well when I tried to use my custom domain “”. Maybe a cache problem?

Looked up on Stack Overflow and tried everything but to no avail.

here is the repo: