is this possible to park a subdomain on the main domain?

is this possible to park a subdomain on the main domain without enabling wildcard subdomains?

i want to make a mobile version for my site on a new subdomain but i want using the same code on my main domain

i read about CNAME record but i cant understand that CNAME records could help

i created a CNAME record with name of app for my domain goldshikmall.com


Solution 1:

One can use CNAME to point a subdomain to same server as the main domain. That is one part of sharing application code with a subdomain and domain.

In addition to that, at least following things need to be done:

  1. Make sure the webserver has a corresponding virtual host defined for the subdomain and it uses the same path for files as main domain.
  2. Make sure your application understands that it is available via two different domains.