Where do I put files for subdomains?

Ok, so I’ve done a bunch of searching so far for this answer, and just can’t really find one that’s clear.

I’m coding my mobile site, just got done with the regular site. I want to direct people to a subdomain to view the site on their phone, e.g. http://m.examplesite.com or like http://m.cnn.com

I’ve setup the subdomain on godaddy.

Where do I put the html files for this subdomain on my site? If someone goes to http://m.examplesite.com, do they view files in the /m folder? If so, what do I name my html files? Do I put an index.html file in that /m folder?

If possible, I like to not include any php or javascript to achieve this. And, I’d also not like to redirect people to something like http://www.examplesite.com/m

What’s the standard way of doing this?

Any help would be great.
(first post on here btw - bought a sitepoint css book, it’s been great)


Did I stump everyone?

Haha, maybe I should move this post somewhere else on the forum?

Upload files in sub-directory of public_html folder :smiley:

I appreciate your help.

Could you be more specific - I’m a total noob man. The public_html folder is my regular place I put files for my site? Is this the “/” folder?

And by sub-directory, do you mean a folder within that? Like /example/page1.html?

Could you clarify for me?

  1. Please ask GoDaddy support to help you and assist as they are your host.
  2. I am not sure about GoDaddy setup. Mostly users have a folder public_html in LINUX shared hosting. when you create a sub-domain system makes automatically a sub-folder under that folder and you have to upload files into that folder.
  3. Please check your file system and if you find out any folder for sub-domain upload files there.

Good luck

I’ll do that.

One last question for ya:
What is the “index.html” file that should go into that folder? In other words, when a user visits my site, www.m.example.com, which html file is it going to look for?

Is it /m/index.html?

Yes :smiley:

GoDaddy use their own custom version of Plesk as their control panel so only they and those actually using their service would know exactly how they have it set up to handle sub-domains.

The last hosting I had that used Plesk stored the sub-domains in separate folders at the same level as the folder containing the main site but as that was a standard Plesk install and not the modified GoDaddy one that doesn’t mean GoDaddy necessarily have it work that way.

Great, thank you so much. Hopefully this will work.

Add your subdomain name to your web hosting account add on domain name. Then create FTP account for it and only then upload all files there

After speaking with 4 different tech support people at Go Daddy, they finally came to that conclusion.

Create a dedicated domain for the site! Just setting up a subdomain based off my regular site www.m.example.com, will NOT keep users there. Ultimately, it just redirect them to www.example.com/m

So I had to upgrade to a deluxe hosting plan to have multiple domains. I set up the m.example.com and it works! woot woot! (just cost me $20 more a year, oh well.)

Check it out . . .


Disclaimer - only coded for iPhone for now, droid and bb to come.