isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

Cannot remove custom domain #1213

Closed OKNoah closed 4 years ago

OKNoah commented 6 years ago

I configured a custom domain on my project and my github.io address redirects to it.

However, I now need to remove it and return to github.io, if possible.

How do I prevent github.io from redirecting?

coliff commented 6 years ago

Remove the CNAME file from the repo.

OKNoah commented 6 years ago

@coliff I can't locate any CNAME in the repo. Pretty sure this was set in settings. Perhaps making a new CNAME of ACCOUNT_NAME.github.io/REPO would work? Although doing this didn't work in settings.

coliff commented 6 years ago

Hmm, maybe turn turning GitHub Pages setting off in Settings.. and then turning it back on. it should then show a 'Your site is published at: ACCOUNT_NAME.github.io/REPO message

coliff commented 6 years ago

And make sure in the Settings the 'Custom domain' entry box is empty!

OKNoah commented 6 years ago

@coliff The box is empty, and when I click the drop down to select a branch for the Pages, the "none" option is disabled. I don't see another way to disable it. Sorry if I'm missing something obvious.

coliff commented 6 years ago

Strange.. If you have control over the domain name I guess you could set it to NOT point at GitHub then it'd be impossible for it to resolve. Can you tell us the domain name so we can take a look? Is the GitHub repo public?

OKNoah commented 6 years ago

@coliff The domain name expired and is currently being squatted by the domain name registrar (perhaps I can buy it back). Also the repo is oknoah/slipstream on the, and data in the www branch.

coliff commented 6 years ago

ugh, I'm running out of ideas... How about changing the repo name so the URL changes - maybe: https://oknoah.github.io/slipstream_app or whatever.... worth trying.

OKNoah commented 6 years ago

No joy I’m afraid, simply forwards to myolddomain.com/sliptream_app

On Apr 16, 2018, at 11:25 PM, Christian Oliff notifications@github.com wrote:

ugh, I'm running out of ideas... How about changing the repo name so the URL changes - maybe: https://oknoah.github.io/slipstream_app https://oknoah.github.io/slipstream_app or whatever.... worth trying.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacs/github/issues/1213#issuecomment-381861458, or mute the thread https://github.com/notifications/unsubscribe-auth/ADkOjfjXKim_sM5KMsQrv-JimodrqURNks5tpYrwgaJpZM4TH_1f.

coliff commented 6 years ago

Ah! Your user page us: https://oknoah.github.io and there's a repo for that - and I found this! https://github.com/OKNoah/oknoah.github.io/blob/master/CNAME - it is the expired domain name. Can you try removing that?

OKNoah commented 6 years ago

Wow, thanks so much for your help, would not have thought of that. Owe you one.

On Apr 16, 2018, at 11:35 PM, Christian Oliff notifications@github.com wrote:

Ah! Your user page us: oknoah.github.io and there's a repo for that

I found this! https://github.com/OKNoah/oknoah.github.io/blob/master/CNAME - is has the expired domain name in that. Can you try removing that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacs/github/issues/1213#issuecomment-381864035, or mute the thread https://github.com/notifications/unsubscribe-auth/ADkOjSwiLj-rhM_POxvxdTKA_WBsVEttks5tpY05gaJpZM4TH_1f.

davidmisiak commented 6 years ago

I had the same problem and even when I removed everything that seemed to be connected to the Github Page, redirecting to incorrect website persisted. Turned out that it was due to Chrome cache - after deleting browsing data, the redirection vanished. I just thought it might help someone.

mahdiASC commented 6 years ago

https://github.com/USERNAME/USERNAME.github.io/blob/master/CNAME

I was lost without this!

Apparently your user's GitHub domain automatically comes from your {username}.github.io repo. Come to find out the CNAME file there was doing the redirecting.

KarelWintersky commented 5 years ago

Same issue. Removed CNAME, cleared field Custom domain, but https://imaginariaru.github.io/RPGLinks/ redirecting to http://rpglinks.wintersky.me/

coliff commented 5 years ago

@KarelWintersky - the CNAME is still on your repo: https://github.com/imaginariaru/rpglinks

Delete the CNAME and it'll stop redirecting.

KarelWintersky commented 5 years ago

@coliff

now it works correct. But: I can't set CNAME for Project Repo Inside Origanization.

coliff commented 5 years ago

@KarelWintersky you can set the CNAME for a project repo isnside an organization - I've done it before myself for https://caniuse.email at: https://github.com/caniuse-email/caniuse.email/tree/master/docs

KarelWintersky commented 5 years ago

@coliff What are you wrote at your DNS provider? A-records to github ips or CNAME to... what?

coliff commented 5 years ago

I use (and recommend) https://Cloudflare.com for this. A-records are pointing to GitHub.

KarelWintersky commented 5 years ago

@coliff A-records at your DNS provider and CNAME file in repo?

coliff commented 5 years ago

Yes

KarelWintersky commented 5 years ago

@coliff, thank you. I'll try/.

lijon commented 5 years ago

https://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s

mohmdalfaha commented 5 years ago

No way !! I really got fed up with this stupid issue and even thought of migrating to Gitlab lmao It was only the Chrome cache issue

Thanks !!

ghost commented 5 years ago

I have same problem. why not reset? I have no Idea. CNAME delete and rebuild

frtug commented 4 years ago

I have deleted the CNAME but it still redirects from the previous domain that I don't have

justin226 commented 4 years ago

worked for me

trickster commented 4 years ago

I have the same problem. CNAME was deleted. But still my domain https://kons.dev still redirects to Github https://github.com/sivakon/sivakon.github.io/commit/cfbab2d26631b237e4ff39f67a4cfdde37489a20

taufardh commented 4 years ago

and now I face same problem... still redirecting to expired domain

TPS commented 4 years ago

Have any of y'all contacted GitHub support (support@github.com, ifF memory serves, or definitely the Support link at bottom of any GitHub page), pointing @ this issue, & then gotten any response?

taufardh commented 4 years ago

Have any of y'all contacted GitHub support (support@github.com, ifF memory serves, or definitely the Support link at bottom of any GitHub page), pointing @ this issue, & then gotten any response?

tbh.. I already solve my problem. there is a problem with cache in the browser, so the browser keeps redirect domain. but if cache cleared or open in incognito mode it's work fine. And there is a time delay from remove custom domain to become default github pages again.

Rubix982 commented 4 years ago

Was facing the exact same issue! I had no CNAME file at my repo. Using the above suggestions, what worked for me was that I deleted my cache and it worked like magic. Thanks, guys!

i-emek commented 4 years ago

Try to remove cache. I disabled cache and re-enabled it and it did the trick. f12 -> network tab -> disable cache After that, refresh page, and voilà, the page works.

hugocamelo commented 4 years ago

if I delete a entire repo with CNAME and everything will it stop redirect too?

amanmishra17 commented 4 years ago

https://github.com/USERNAME/USERNAME.github.io/blob/master/CNAME

I was lost without this!

Apparently your user's GitHub domain automatically comes from your {username}.github.io repo. Come to find out the CNAME file there was doing the redirecting.

it worked for me I removed the CNAME and it worked. Thanks.

Mondonno commented 4 years ago

I try to disable github pages on my site but always: Zrzut ekranu 2020-10-1 o 15 33 11 I do not know what to do, i privated my repo, so the github pages must disable but they not Please help!

Gibbo3771 commented 3 years ago

This is still busted.

I added my custom domain name with intention of using it, but then found out Cloudflare charge for resolving using page rules. Now I want to remove it and I just can't.

The custom domain box is empty and there is no CNAME file on any of my branches.

coliff commented 3 years ago

@Gibbo3771 -it might take a little while for the DNS settings to propagate. Double-check the DNS settings in Cloudflare (make sure they aren't pointing to GitHub).

Gibbo3771 commented 3 years ago

@coliff I never even got to adding it to Cloudflare. When I go to my pages link, it's redirecting me to my domain. So this is Githubs DNS that is either not propogating properly, or the setting is never removed.

coderpranay commented 3 years ago

@coliff I configured a custom domain on my project and my github.io address redirects to my custom domain. Can you tell how i can remove?

coliff commented 3 years ago

@coderpranay delete the CNAME from the project if you don't want it there. if you need more help provide more details (maybe repo of your project)

masoncooley commented 3 years ago

I had to clear browser cache after I deleted the CNAME file for it to work.

seahopki12 commented 3 years ago

Interesting. Same issue. I can view the page in incognito, but clearing cache doesn't not seem to do anything, nor does there appear to be any cache data to begin with.

https://github.com/seahopki12/React_Portfolio

seahopki12 commented 3 years ago

^ I think I fixed my own issue.

Initially, I tried clearing my cache from the developer tools:

F12 -> application -> storage -> check cache boxes -> clear site data.

This did not work for me.

Then, I tried the following method:

Chrome -> Clear browsing data... -> Select cached images and files -> clear data.

That did the trick for me.

MrTyton commented 3 years ago

Wait, is there a way if you have the {name}.github.io set up to not have a project be under that subdomain? I explicitly don't want that for one of my projects, I would much rather prefer the default github page.