How to Map/Point a Domain to Subdomain both on same server sharing same IP?
Posted: Fri Jul 24, 2020 10:50 am
I'm developing a website for a client using Opencart. His account/domain and my account/domain are both hosted on the same server and IP address.
I don't wanna share the code however I wanna map hisdomain.com to subdomain.mydomain.com while he keeps accessing his on cPanel to create email and install the SSL.
Also in the source code of the website I don't wanna show the subdomain as the main link but the domain itself.
While anyone that tries to access subdomain.mydomain.com it will show hisdomain.com
The option is easy to be achieved via Wordpress however any other frameworks like Opencart, Laravel, CodeIgniter, etc. I couldn't find any way to achieve that.
I entered a CNAME record pointing subdomain.mydomain.com to hisdomain.com
Then I removed www A records from DNS at hisdomain.com and changed it to CNAME pointing hisdomain.com to subdomain.mydomain.com
However this didn't help. I googled and searched a lot couldn't find the suitable answer for that. Any suggestion please!
I don't wanna share the code however I wanna map hisdomain.com to subdomain.mydomain.com while he keeps accessing his on cPanel to create email and install the SSL.
Also in the source code of the website I don't wanna show the subdomain as the main link but the domain itself.
While anyone that tries to access subdomain.mydomain.com it will show hisdomain.com
The option is easy to be achieved via Wordpress however any other frameworks like Opencart, Laravel, CodeIgniter, etc. I couldn't find any way to achieve that.
I entered a CNAME record pointing subdomain.mydomain.com to hisdomain.com
Then I removed www A records from DNS at hisdomain.com and changed it to CNAME pointing hisdomain.com to subdomain.mydomain.com
However this didn't help. I googled and searched a lot couldn't find the suitable answer for that. Any suggestion please!