I just bought a domain, I want to redirect all of the subdomains to the main one but without the user really "knowing", if that makes sense. I use GitHub pages for hosting. What I need is as such:
- User goes to sub.domain.com
- Actually sees domain.com's HTML, modified a bit using JS to suit "sub".
- URL bar stays the same
I've tried adding a CNAME from * to domain.com, but I get a 404 from github when I try accessing any subdomain. What am I doing wrong? I'm using namecheap.