Can't add my custom domain on Github Pages #23051
-
Hello. Today, I purchased domain name “ishaanbhagat . com” and tried to connect GithubPages to it. It worked, but the repo I used was using a Jekyll Theme that looked quite bad, and I could not find a way to fix it, so I permanently deleted my repo called “ishaanbhagat.github .io”. Later the same day, I created another repo with the same name, forked from a another user’s repo. However, at the Settings > Pages Menu, when I try to add “ishaanbhagat . com”, it says The CNAME I have a feeling that the previous instance of the repository is still linked to the CNAME file with my domain, however, I am unable to access this repository as it had the same name as the new repository. The site itself shows this error code, presumably due to the linked repository being deleted. BTW some links have spaces in them as a new user can only upload 2 links. I do realize that it probably wasn’t the best idea to permanently delete the repository I intended on working on, but I would greatly appreciate any help you can give me. Do advise me on what to do so I can connect my domain to this new site. |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
It looks like something might have gone wrong with attaching your CNAME file and it looks like it’s in a strange state where it’s only half-linked to your site 🤔 This is likely due to the filename and contents being corrupted: github.comishaanbhagat/ishaanbhagat.github.io/blob/e6cb868633d4a96b739952fe71465e3fe9d5ed09/.CNAME.un~
Can you try deleting this file and then attaching your custom domain to your site from the Pages section in your repository settings again? |
Beta Was this translation helpful? Give feedback.
-
Hi Thomas, Thanks for your quick response. I tried deleting the file and then trying to attach the custom domain from Pages in settings, however, I’m still getting the same error as before 🥲. Do you have any other suggestions? |
Beta Was this translation helpful? Give feedback.
-
Fwiw, that’s a vim undo file: |
Beta Was this translation helpful? Give feedback.
-
If you’re still seeing this error then the best thing to do is probably to delete and recreate this repository. Make sure you clone a fresh version first so you can push it back up to GitHub so you don’t lose any of your work! |
Beta Was this translation helpful? Give feedback.
-
Hey Thomas, I just did what you suggested, cloned a version of the repo, then deleted it and recreated with the cloned backup. However, I’m still getting the exact same error as before, saying that the domain name is already taken. Is there any way for you to ‘wipe’ the domain name When I had purchased the domain name, the web address was basically blank. Hence, it looks like some remnant of a deleted repo or something of that nature is still linked to the web address. Am I correct in my thinking? If so, is there anything you can do on your side to ‘de-link’ the domain name? Thanks a lot for your help with this, |
Beta Was this translation helpful? Give feedback.
-
Unfortunately not. Your site is in a stange state right now where Pages things your domain is attached but the CNAME file doesn’t exist inside your repository, which is very strange. Can you try creating this CNAME file manually and see if that helps? It should be a file called
Can you try pushing that file to your repository and seeing if it fixes this? |
Beta Was this translation helpful? Give feedback.
-
Hi Thomas, Thanks for your reply. Just tried creating and pushing the CNAME file, it seems to have done something but not exactly what I wanted. Now, when I try attaching my custom domain in Pages settings, I get the following message ‘No changes to custom domain.’ The message stays the same no matter how many times I click it, and the actual domain still shows the ‘404 Error’ Github Pages screen. Do you have any suggestions for what I could try now? Thanks again for your help, |
Beta Was this translation helpful? Give feedback.
-
Seems to be fixed, finally! I triggered a rebuild of your site from the backend and it looks like your domain has been attached correctly now 🎉 Not entirely sure what went on here. I’ll pass this on to the Pages team to investigate I think because it was especially strange, but your site should be working properly now. |
Beta Was this translation helpful? Give feedback.
-
Great, thanks so much for your help Thomas! |
Beta Was this translation helpful? Give feedback.
-
I need help my problem is similar my GitHub account got suspended and I had a custom domain in one of the repos and now I have a new GitHub account I want to be able to use the same domain but it says it’s already in use from the suspended account. This is very urgent |
Beta Was this translation helpful? Give feedback.
-
Hi @BenjaminHornbeck6, you’ll need to contact the support team directly to fix this as it may involve dealing with private account details. |
Beta Was this translation helpful? Give feedback.
Seems to be fixed, finally! I triggered a rebuild of your site from the backend and it looks like your domain has been attached correctly now 🎉
Not entirely sure what went on here. I’ll pass this on to the Pages team to investigate I think because it was especially strange, but your site should be working properly now.