Jump to content

Recommended Posts

Posted

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

Posted

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?

Posted

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...