Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub pages custom domain infinite redirect loop

I'm having an absolute nightmare trying to setup a custom TLD domain with github pages. For some reason http://www is redirecting to http:// and then back to http://www over and over in an infinite redirect loop.

My settings with 123-reg are:

DNS ENTRY   TYPE        TARGET/DESTINATION
@           A           204.232.175.78        
www         CNAME       scottyv.me.

And i have a CNAME file setup correctly in my repo. Can someone please tell me what i'm doing wrong?

like image 801
Scotty Avatar asked Jul 08 '12 10:07

Scotty


People also ask

Does GitHub Pages support custom domain?

You can customize the domain name of your GitHub Pages site. GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

How do I redirect a custom domain to GitHub?

On your site's repository, click the settings tab . Under custom domain, type your custom domain and save. GitHub will automatically create a commit with a CNAME file at the root of your repository. Visit the dashboard provided by your domain provider and add a CNAME record pointing to your subdomain.

Is custom domain free GitHub Pages?

GitHub Pages is just the solution to that problem. It's free. You can host your website, including custom domain names(https://dhrumil.xyz), 404 error page, sub-domain (https://blog.dhrumil.xyz) and all over secure https.

How do I redirect a link in GitHub?

The redirect is accomplished with a <meta> tag. By setting the http-equiv attribute to refresh and the content attribute to 0; URL=https://example.com/ we will redirect the user to 'https://example.com/'.


2 Answers

Not sure if you have solved this yet, but I had a similar problem with redirects and 123-reg. I think what you are missing is another 'www' DNS Entry that points to the IP Address defined for DNS Entry '@'.

I wrote a quick blog post on it, with some images

Hope this helps.

like image 134
Donal Avatar answered Sep 22 '22 16:09

Donal


I had a similar problem. In my case, my DNS was correct (Network Solutions), but I had left out the "www" in my CNAME file. I had "yoursite.com" instead of "www.yoursite.com". Once I added the "www", the infinite redirects were fixed.

like image 20
Justin Domnitz Avatar answered Sep 20 '22 16:09

Justin Domnitz