2

I had my blog on github pages with a custom domain name blog.tamizhvendan.in and today I've moved it to a new domain name www.p3programmer.com by updating the CNAME record with www.p3programmer.com. The new domain name is working fine.

As it is a breaking change, I would like to have a domain redirection which redirects the old one to the new one. I've configured the same in my DNS Server (BigRock) using their Domain Forwarding System. After that, tamizhvendan.in is redirecting correctly to www.p3programmer.com but blog.tamizhvendan.in resulting in 404 in github pages. By BigRock's documentation, for subdomains will be redirect to path www.example.com\{subdomain} i.e in this scenario it should redirect to www.p3programmer.com\blog but it is not redirecting.

I've added a CNAME record in the tamizhvendan.in account with the value pointing to www.p3programmer.com but yet I am getting github page's 404 page error.

Here is my dig output of blog.tamizhvendan.in

; <<>> DiG 9.10.1-P2 <<>> blog.tamizhvendan.in +nostats +nocomments +nocmd
;; global options: +cmd
;blog.tamizhvendan.in.          IN      A
blog.tamizhvendan.in.   2658    IN      CNAME   www.p3programmer.com.
www.p3programmer.com.   1818    IN      CNAME   tamizhvendan.github.io.
tamizhvendan.github.io. 427     IN      CNAME   github.map.fastly.net.
github.map.fastly.net.  30      IN      A       23.235.44.133

Dig output of www.p3programmer.com

;; global options: +cmd
;www.p3programmer.com.          IN      A
www.p3programmer.com.   1740    IN      CNAME   tamizhvendan.github.io.
tamizhvendan.github.io. 349     IN      CNAME   github.map.fastly.net.
github.map.fastly.net.  30      IN      A       23.235.40.133
2

did you follow the following steps?

https://help.github.com/articles/adding-a-cname-file-to-your-repository/

2
  • I've followed this only. Its working for www.p3programmer.com. But my issue is blog.tamizhvendan.in is not redirecting to www.p3programmer.com and its showing 404 – tamizhvendan Feb 20 '15 at 13:39
  • forwarding isn't a dns thing.. it is handled on the webserver – Mike Feb 20 '15 at 17:23
1

Github seems to only support one external domain per repository, at least according to their documentation Adding a CNAME file to your repository:

Note that there can only be one domain in the CNAME file.

So you need a page which answers all request to blog.tamizhvendan.in with a 301:

HTTP/1.1 301 Moved Permanently
Location: http://www.p3programmer.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.