Page 1 of 1

Subdomain redirects to main site

Posted: Fri Jun 14, 2019 8:16 am
by HenrysCat
I have created a subdomain test.mydomian.com but it loads the site from the public_html of mydomain.com.

DNS in managed externally by namecheap so I created a CNAME record there, host = test, value = mydomain.com, added the subdomain in vestacp under WEB then add web domain, did I miss anything?

Thanks all

Re: Subdomain redirects to main site

Posted: Tue Jun 18, 2019 8:22 am
by linuxman
HenrysCat wrote:
Fri Jun 14, 2019 8:16 am
I have created a subdomain test.mydomian.com but it loads the site from the public_html of mydomain.com.

DNS in managed externally by namecheap so I created a CNAME record there, host = test, value = mydomain.com, added the subdomain in vestacp under WEB then add web domain, did I miss anything?

Thanks all
For subdomain test.mydomian.comyou need yo add A record not CNAME.

Re: Subdomain redirects to main site

Posted: Tue Jun 18, 2019 8:27 am
by linuxman
linuxman wrote:
Tue Jun 18, 2019 8:22 am
HenrysCat wrote:
Fri Jun 14, 2019 8:16 am
I have created a subdomain test.mydomian.com but it loads the site from the public_html of mydomain.com.

DNS in managed externally by namecheap so I created a CNAME record there, host = test, value = mydomain.com, added the subdomain in vestacp under WEB then add web domain, did I miss anything?

Thanks all
For subdomain test.mydomian.com you need yo add A record not CNAME.
Something like

Code: Select all

www    IN CNAME   mydomian.com
mail     IN CNAME  mydomian.com
test.mydomian.com IN A       192.168.2.6