Redirect Github Pages to custom domain -


i have created github pages site , put on repository abc of github account username xyz. so, site live on xyz.github.io/abc created cname file custom domain, , configured dns settings said on github pages. now, site live on mycustomdomain.com now, don't want site live on xyz.github.io/abc . want redirect mycustomdomain.com or not accessible. there way that? know can create user pages site (with username.github.io) automatically redirect custom domain, want create project site. suggestions?

a cname solution:

sure. github has nice functionality it.
when create cname folder inside of repo, redirected: https://help.github.com/articles/adding-a-cname-file-to-your-repository/

check out github pages website: https://github.com/ondrek/ondrek.github.io
( can browse ondrek.com, it's impossible browse ondrek.github.io )


a js solution:

if want redirect custom page — possible solution javascript redirection.

if (window.location.href==="https://xyz.github.io") {     window.location.href = "https://mycustomdomain.com";  } 

but not solve problem google. can solve correct using google webmaster tools , tell google duplicate (for seo purposes).


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -