Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 4

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

Solved! Go to Solution.

I want to host the repository https://github.com/cmitiisertvm/cmitiisertvm.github.io on github pages and use the custom subdomain cmit.iisertvm.ac.in. I added a CNAME record for cmitiisertvm.github.io 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 cmit.iisertvm.ac.in is already taken. There are no other repositories using this CNAME currently, so I can't figure out the problem. Please help.

3 Replies
Highlighted
Commander Lvl 2
Message 2 of 4

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

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! 



*Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!*
Highlighted
Solution
Copilot Lvl 2
Message 3 of 4

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

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 subdomain.domain.com is already taken".

 

Patrik has written a lot about subdomain takeovers in his blog here: https://0xpatrik.com/

 

Hope this was useful.

Highlighted
Ground Controller Lvl 1
Message 4 of 4

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

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