i understand just about anything about sub-domain names and dns records. i've learned about them and that i know only the fundamentals.
Really, on my small server, i actually do create the subdomain under plesk after which contact my hosting to produce the best dns. as well as in 1-a couple of days the subdomain is obtainable from everywhere (plesk can manage dns instantly, i understand, but becose i have no idea so how exactly does dns exactly works, i favor to allow my hoster handle them)
But.. whenever you do register using blogging services.org, posterous.com, etc, they've created a subdomain like http://yourname.service_title.com that's ready in couple of seconds.. how?
I understand this may be an question hardly to response because my lack of knowledge i dont understand how to formulate the question better -.-
Oh, if it can benefit, my atmosphere should be linux (debian really)
Many people accomplish this using a Wildcard DNS Record, this provides the appearence of making subdomains instantly.
Once you have a wildcard DNS setup such as this:
*.example.com A 18.104.22.168
You have to tell Apache you would like all sub domain names to become caught with a virtual host, this can be done with ServerAlias:
In PHP after that you can take a look at $_SERVER["SERVER_Title"] to determine what subdomain has been utilized to gain access to the virtual host, after that you can have subdomain specific code/content.
Here's the way in which pastebin.com performs this:
- wildcard DNS record points all subdomains in the webserver IP
- apache will be sending all demands for "unknown" domain names towards the first virtual host - you are making the code on that host able to do something interesting using the domain title (in PHP, this really is presented as $_SERVER['HTTP_HOST']
This way, no DNS or Apache re-configuration is needed.
Wordpress does not create subdomain, it even can't create it as this is part of apaches virtual host configuration files.
The only method to make subdomain would be to create another virtual host record, combine it with the DNS record, but that can take 24 hrs to refresh DNS servers. Plesk along with other control sections can manage that, but Wordpress can't becasue it is only PHP script which most likely does not have permissions to achieve that type of stuff. Besides, you do not specify in which you configuration file is, so Wordpress can't know where virtual host are :)
Please inform us much more about that Wordpress subdomains, in which you create them etc.
Also please be aware that you could via. Apache arrange it therefore it utilizes a regular expression about the incomming hostname and through this set document root to become something similar to:
/var/world wide web/topleveldomain.com/subdomain/wwwroot
This could provide the illusion that there are been alternation in config files and all sorts of that black miracle to permit mysubdomain.topleveldomain.com to become new subdomain simply by developing a folder in the best place.
Also note, it goes using the star aliasing within the DNS record.
However, I doubt that's how wordpress will it and exactly how Paul Dixon mentions is most likely much more likely.