Some years ago I added a custom domain from free site just to try a new feature of Github. Now that I want to make a page my main url keeps getting redirect to myexpireddomain.com ...
http://myuser.github.io => myexpireddomain.com
http://myuser.github.io/page => myexpireddomain.com/page
and this all results in 404...since domain doesn't exist.
I think I need to remove cname file somewhere. But out 20 repos that I have I don't see any that should cname... which repo is at the root domain. http://myuser.github.io
Click on the green Manage button beside URL Forwarding. Then select the option Disable Redirection and click Save. This will remove the redirection DNS records setup for the domain and stop your domain from redirecting.
Redirection is part of a website's code, and you can't completely disable it, but a workaround in your Internet settings gives you control over which redirects you want to follow. With the right settings, your computer blocks certain sites and asks for permission before redirecting.
How: From Setup, in the Quick Find Box, enter Sites , then select Sites. In the Sites list, click the site name, then click Edit. Select Redirect to custom domain and save your changes. If multiple custom domains serve the site, requests are routed to the site's primary custom URL only if it's an HTTPS custom domain.
For removal of custom domain, I removed all of the text from the custom domain field in the settings for that particular website, then pressed save. Then, I found out that you have to clear the browser cache (in google chrome I just cleared all of the browsing data for the last hour), otherwise it will still redirect to the custom domain!
Also, make sure that the CNAME file in your repository is deleted. Github pages creates this for you when you add a custom domain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With