Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I recently thought to myself why certain websites have very unique domain names.

Is it possible for a website to have for example www.aboutus.example.com instead of www.example.com/aboutus ?

Like for Stack Exchange, it has many different domain names? Is that what it's called? Domain names?

For example:

  • http://android.stackexchange.com/
  • http://webmasters.stackexchange.com/
  • http://gamedev.stackexchange.com/

So if I want my website to have quite a few pages, can I actually create a website with

  • www.aboutus.example.com
  • www.home.example.com
  • www.contactus.example.com

What is this actually called and is it possible?

share|improve this question
add comment

2 Answers

You need to understand what subdomains are.

When you purchase a domain, you purchase something like example.com.

If you see something like www.example.com or aboutus.example.com, aboutus is just a subdomain of example.com. When you see something like www.aboutus.example.com, www is a subdomain of aboutus.example.com. When you insert a dot (.), you create a subdomain.

When you purchase a domain like example.com, you can create several subdomains and sub-subdomains (as you want). For your information, each subdomain represents a different website.

Stack Exchange doesn't have different domain names, the company has the stackexhange.com domain name and several subdomains of it.

share|improve this answer
    
Are . and / the same thing. could I go to stackexchange.com/andorid? –  Qwertie ϟ Feb 23 at 6:04
    
@Qwertieϟ . and / (subdomains and "subfolders") are implemented very differently technically. Whether a subdomain refers to a subfolder is dependent on the implementation. This is a common setup on some hosts, however, it is not always the case and is not the case with stackexchange.com/android. –  w3d Feb 23 at 17:09
add comment

Generally, when you see names instead of IP Addresses, they are called, in general "domain names". Thus:

  • example.com is a domain name
  • sub.example.com is also a domain name
  • srv.sub.example.com is also a domain name

The .com part is called a TLD (Top Level Domain). The example part is called 2LD (Second Level Domain) and so on. The higher level domains are generally called "subdomains" of the lower level ones. Thus, referring to the examples above:

  • sub is a subdomain of example.com
  • srv is a subdomain of sub.example.com

Now, in a URI, the parts after the slash after the domain name, is handled by the server who is using the domain name. For example, if we have the URI http://sub.example.com/about, the browser contacts the server called sub.example.com using the HTTP protocol, informing the server that the browser wants to view an object located in /about (note the leading slash).

Is it possible to change the URI from http://sub.example.com/about to, let's say http://about.sub.example.com? Yes, but one needs a different IP address to ensure that what's returned by the latter is different from what's returned by http://sub.example.com. The reason is that HTTP version 1.0 don't provide the full URI in its request, only HTTP version 1.1 actually provide the full URI. Thus, a browser not supporting HTTP version 1.1 will cause the server to be confused and likely receives the wrong page.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.