0
votes

I am hosting a web application on a tomcat server and the current URL for example is www.mysite.com I plan to create a Mobile version of my site and I want to be able to access it with the URL m.mysite.com

How to I create the sub-domain with my domain mysite.com?

2

2 Answers

1
votes

You need to add records to your DNS server:

  • Option one: an A and/or an AAAA which points to your IPv4/IPv6 addresses
  • Option two: a CNAME record to point to e.g. your www subdomain

Also your server needs to know that it should show other content on that virtual host.

0
votes
  1. You should setup your DNS zone to have subdomain point at whatever IP address you have at your hosting server. Check if you may just ping your m.mysite.com.
  2. You should ensure your webserver will answer to HTTP requests with Host: m.mysite.com header. This could be called VirtualHost.