Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop redirecting to custom domain?

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

like image 544
Muhammad Umer Avatar asked May 25 '15 17:05

Muhammad Umer


People also ask

How do I stop my domain from redirecting?

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.

Can you stop a website from redirecting to your website?

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 do I redirect a custom domain?

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.


1 Answers

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.

like image 118
wlwl2 Avatar answered Nov 09 '22 04:11

wlwl2