Page 1 of 1

How to Map/Point a Domain to Subdomain both on same server sharing same IP?

Posted: Fri Jul 24, 2020 10:50 am
by webiscore
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!

Re: How to Map/Point a Domain to Subdomain both on same server sharing same IP?

Posted: Fri Jul 24, 2020 5:21 pm
by letxobnav
this is a webserver virtual hosts issues, not an OC issue, get guidance from your host.

Re: How to Map/Point a Domain to Subdomain both on same server sharing same IP?

Posted: Fri Jul 24, 2020 7:55 pm
by webiscore
Hello,

Please can you elaborate how to do it if I have access to the virtual host how to do it?