mrb712 Posted July 7, 2006 Posted July 7, 2006 I don't know how to describe this succinctly, and I can't really google it, so I hope I've come to the right place. I'm trying to find out the difference between using http://sub.domain.com and http://www.domain.com/sub.html. How do you create a page or a section on your web server with the former and are there any benefits to doing so? I've seen this for years and have never understood the syntax. Hope I'm not too vague. Ask and I'll be happy to splain some more. Can anyone shed any light on this for me? Thanks, Michael Quote
TCH-Bruce Posted July 7, 2006 Posted July 7, 2006 Subdomains are used primarily to break up a website into different sections. Examples: You have your main content in yourTCHdomain.ext, you have a blog in blog.yourTCHdomain.ext, you have a gallery in gallery.yourTCHdomain.ext ... When you create a subdomain in cpanel it creates a new folder in your public_html folder with the name of the sub (section). You can then access the content of that folder using the http://sub.yourTCHdomain.ext. You would normally start over with the content in that folder with it's own index.ext file. You can also access the sub domain using http://yourTCHdomain.ext/sub. But creating a subdomain will leave the address bar in the browser displaying sub.yourTCHdomain.ext In your example of www.yourTCHdomain.ext/sub.html you are just accessing a web page in your public_html folder called sub.html. Does that help? Quote
mrb712 Posted July 7, 2006 Author Posted July 7, 2006 Thanks, Bruce. That makes sense. Easier than I thought it would be! Cheers, Michael Quote
wampthing Posted July 8, 2006 Posted July 8, 2006 I have notice something that makes it helpful to have a sub domain set up as opposed to the other. When I am thinking about doing my site over, I will usually put it up on the web so that I can see it live. If I use a sub domain, my relative paths will work. If I don’t set up a sub domain they wont. it will look at it from the root of the site and not the root of the folder. (I dont know if that makes any sense. I aint too good at that whole writing thing. Perhaps we could get Abinidi here to explain what I am trying to write) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.