Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gh-pages dns 400 bad request/intermitent website

I set up a personal github probject page with gh-pages. I followed instructions from here to set up my DNS information with namecheap

Custom domain for GitHub project pages

This is what my DNS settings look like

https://i.imgur.com/hp3S6Hn.png

With one addition: under the 'www' subdomain, I have a URL redirect to mydomain.com (before I did this, typing 'www.mydomain.com' in the browser would not redirect to mydomain.com)

In the gh-pages branch of my github project, the CNAME file has one line: mydomain.com

It's been 48 hours or so, and sometimes I can connect fine to mydomain.com, while at other times I get an http 400 bad request. The DNS changes should have propagated by now. Any help would be much appreciated.

like image 291
bigcat Avatar asked Dec 24 '22 16:12

bigcat


1 Answers

Your CNAME 'Host' at Namecheap should be www, not @. Here's what mine looks like

hosts

I also have that other CNAME at the end, which I found out about here:

http://abdelraoof.com/blog/2014/09/20/configuring-namecheap-dns-for-github/

it's supposed to redirect from www.yoursite.com to yoursite.com

I removed the default 'URL Redirect Record' type, because I started getting a '400 redirect loop' error when visiting my site, removing that seemed to fix it.

like image 76
wordsforthewise Avatar answered Jan 06 '23 03:01

wordsforthewise