I recently bought a domain name from 1and1.com. I was planning to host my static files on github pages. After I checked my page on github I saw that responsive design works. But when I do the config (on 1and1) for forwarding my domain name (sezinkarli.com) to my github page (sezinkarli.github.io), I saw that responsiveness is gone. Nothing changes if I change the screen size. After a little bit of google search, I learnt that I'll need a proper redirect for this to work. There are several steps for using your custom subdomain (www.sezinkarli.com in my case) for your github page:
Choose a prefix for your subdomain.
Click on your newly created subdomain.
Choose to add a CNAME and put your github pages url as alias.
- Add a file named "CNAME" to your root in your github page. Its content must be your subdomain url. "www.sezinkarli.com" in my case.
- Define a subdomain for your domain. www.sezinkarli.com in my case.
- Configure a CNAME in your subdomain's DNS and point it to your github url (sezinkarli.github.io in my case).
Let me show you these settings ((2) and (3)) for my domain company.
First create s subdomain.
Choose a prefix for your subdomain.
Click on your newly created subdomain.
Edit your subdomains DNS settings.
Choose to add a CNAME and put your github pages url as alias.
Thanks for the tutorial. I followed the instructions but my site keeps redirecting to 1and1 default page. Did you have to configure destination for the main domain?
ReplyDeleteYour main domain must have a frame redirect to your hosting url.
DeleteIn my case, sezinkarli.com is redirected to sezinkarli.github.io. Can you try it?
Thank you for the article!
ReplyDeleteThanks for your post!
ReplyDeleteThank you for this!
ReplyDeleteI read that Post and got it fine and informative. Please share more like that...
ReplyDeletedomeinnamen