Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between http and www

Tags:

html

pardon me for asking a very basic doubt.

I have hosted a page in the site

collinfo.annauniv.edu

The page opens fine when i enter the address as

http://collinfo.annauniv.edu

But when i gave

www.collinfo.annauniv.edu
my browser shows 404 error.

What is the difference that http causes here in place of www.

like image 692
CHID Avatar asked Jan 01 '11 06:01

CHID


4 Answers

The www. before your domain is actually a subdomain. It's essentially the same thing as help.microsoft.com or orders.amazon.com.

With that in mind, there are a few things that could be happening:

1) Your DNS records do not include the appropriate A Record for the www subdomain. In this case, you'll need to setup an A record that points to your web site's IP address. If you don't know how to do this, your web host should be able to help.

2) Your server is not configured to handle the www subdomain. If you're using the apache web server, it needs to be configured to show your web site when the user enters www before your domain. Again, your web host can set this up for you.

It all comes down to a misconfiguration issue. If you don't have experience administering web servers, you may want to give your web host a holler.

like image 109
Jesse Bunch Avatar answered Oct 12 '22 08:10

Jesse Bunch


www comes from the (rather) old time where a domain had several sub-features, of which the web was not always the main service. For instance

www.domain.tld for web
mail.domain.tld for mail
ftp.domain.tld for ftp
domain.tld for web

but this is a convention - any subdomain may point to anything actually.

This is more a question of DNS declaration and/or web-server configuration ; in this case it is probably that the web-server configuration does not trigger the same pages for www.domain and domain (since you get a 404).

The author / administrator of collinfo.annauniv.edu either forgot to create a DNS entry for www.collinfo.annauniv.edu or did not create a virtual domain (web-server side) for it that would point to the same pages as collinfo.annauniv.edu.

like image 43
Déjà vu Avatar answered Oct 12 '22 09:10

Déjà vu


HTTP is a protocol.

http://collinfo.annauniv.edu

Is the address of a resource which can be retrieved using HTTP.

annauniv.edu is the domain in your case. collinfo is the subdomain. www.collinfo is also considered as a subdomain but it does not exist. That's why you get HTTP 404 not found.

Subdomain can be anything, www is usually used as it usually mean World Wide Web.

like image 41
airmanx86 Avatar answered Oct 12 '22 07:10

airmanx86


WWW is a subdomain

HTTP is a protocol (language)

Whether you specify HTTP in the browser or not, the browser will always assume the request is being of "http" type and will ussually add http:// for you.

WWW however is just an alternative subdivision of the domain name, the same as in:

www.domain.com

site.domain.com

sub1.domain.com

sub2.domain.com

.....

etc.domain.com

In most cases the WWW subdomain will point to the same "page" as the main domain, which is usually called the "index" page, such as index.html, or index.php and in most cases the index page is hidden in the browser's address bar, unless you specifically type it in, such as http://www.yahoo.com/index.html, but you have to understand that if you have a full control of your webserver you can modify these, so WWW doesn't point to the same page or you can call you main page "home.html" instead of "index.html" and instruct your webserver to "point" your browswer to that page by default.

But things like HTTP are not easily changed, since HTTP is the main language of the web and most browswers use that as the primary means to access the webservers. Peace!

like image 2
techexpert Avatar answered Oct 12 '22 08:10

techexpert