OneMoreError
OneMoreError

Reputation: 7728

Webpage not opening when URL prefixed with www

I have a simple question which may be naive, but am still gonna ask it anyways-

When I try opening a website with this URL : www.oyc.yale.edu It doesn't open, however if I open it by removing www from the URL oyc.yale.edu, it opens up.

Isn't www supposed to prefixed before every URL ? Also, what about http ? Can some one care to explain ?

Upvotes: 1

Views: 59

Answers (3)

Henry
Henry

Reputation: 43728

The general form of a HTTP URL is

http://<host>:<port>/<path>?<query>#<fragment>

Not all the components need to be present.

In your example the URL would be http://oyc.yale.edu, which just has a <host> part. The http is mandatory, but most modern browsers add it automatically if not provided by the user. The <host> is the DNS name of the site, there is often a www prefix in the name but this is only a convention and a site may choose a name without it.

Many other forms of URIs exist, refer to RFC 3986 for the full details.

Upvotes: 1

Savion  Smith
Savion Smith

Reputation: 46

www. can only be pre-pended to a domain if it is pointing to the landing page. However, what you have here OYC (being the subdomain) being pre=pended by another subdomain of WWW.

Http:// is standard protocol to accessing a domain. It is there (or https:// which is a more secure connection) even though you don't see it in the browser.

Upvotes: 0

Patrick Gunderson
Patrick Gunderson

Reputation: 3281

the www you see on many URLs is in-fact an optional subdomain. Subdomains (separated.by.dots) may point to a different address than their parent domain, or they may not be defined by the admin. If an admin doesn't define the subdomain www to be anything then www.oyc.yale.edu is the same as somerandomwords.oyc.yale.edu. Further, www doesn't have to point to the same server as the parent domain, so www.oyc.yale.edu doesn't have to deliver the same content as oyc.yale.edu, in the same way that oyc.yale.edu doesn't deliver the same content as yale.edu or www.yale.edu. That they do is simply a courtesy and tradition.

As for HTTP, that's optional in a browser these days. HTTP stands for HyperText Transfer Protocol. A Protocol is a defined way that computers talk to each other. There are actually a number of protocols on the internet, and the HTTP just tells your browser which one the server uses. Another common protocol on the internet is FTP, File Transfer Protocol. Your browser can understand both. Try going to ftp://ftp.microsoft.com to try it out.

Upvotes: 3

Related Questions