Sub-domain for a DNS I do not manage


#1

We have a domain (domain.com) which needs to have a mobile version of the site (m.domain.com).

The DNS administrators required us to obtain a unique IP for domain.com, which we have done. If you visit domain.com it actually points to www.domain.com, and then the IP we acquired for them.

Because they aren’t always the most responsive people and would rather not do any work, setting up m.domain.com fails the normal way.

Customizing the m.domain.com (hosted by DH) DNS settings, is there a method to have this domain work without involving the DNS administrators?

I think I can use A record, but I’m not sure of what to put in the values.

Thanks
-Nathan


#2

Not a chance. Anything that falls under example.com will look toward the authoritative DNS server. Your best bet would be that instead of redirecting a mobile user to m.example.com, you’d have to redirect to example.com/mobile, or even set up a new domain like mobileexample.com for your mobile users.


#3

Is there a method, maybe using .htaccess and PHP, to have the example.com/mobile appear in the browser as mobile.example.com?

I got this from the DNS administrator:

I didn’t say that “the IPs should not be unique”, but I said that “the IP addresses must not be unique”. There is a difference between “should” and “might”. I’ve already explained your colleague that the current IP address can be used for your subdomains. But in that case, your web server must be properly configured. It must support the virtual hosts. This functionality has to do nothing with DNS (“A or CNAME records”).
You can ask your web developer or a system administrator about it.


I’m not certain if DH supports vhosts… I haven’t been able to find if they do or documentation on how to manage them.

Thanks again.
-Nathan


#4

As soon as your browser shows “mobile.example.com,” it’ll hit DNS to find out the IP address of mobile.example.com.

The unique IP address part of your message isn’t sinking in right away, but the vhost part makes sense. A webserver will use the requested URL to determine which directory to pull data from. If the browser requests a.example.com, the server knows to go to the /home/user/a.example.com directory. If the browser requests b.example.com (at the same IP address), the server knows to go to the /home/user/b.example.com directory.