Why WWW?

This week, archive.org removed the www prefix from their URLs. So, why we use WWW and why would one go against the flow (not that the flow is strong) and drop it?

The prefix is a legacy from the days when World Wide Web was born on CERN. The main website of organization was available on the www.cern.ch domain. Ever since, the prefix was adopted as the main domain by almost every site on the web.

On the age of the so called Web 2.0, companies like Facebook, Twitter and GitHub redirect the traffic from www. domain to the root domain. The practice has been encouraged for almost a decade and is used as a good practice for SEO by the HTML5 Boilerplate. Removing the prefix makes the URL shorter and put the company brand in evidence.

So, why still argue about use or not the www fossil prefix? Let’s see some examples: try accessing google.com, heroku.com or reddit.com. You will be redirected to the prefixed domain. Why?

The prefix makes it much easier to recognize the domain as a website URL, especially considering the variety of TLD available now (and it will get worse). www.example.com is much more friendlier than http://example.com. Customers are used to domains starting with www.

Another reason may be technical. Usually, root domains can’t be used as a CNAME record, they must be pointed directly to an IP address, using an A record, what makes load balancing much harder.

With CNAMES, you assign multiple entries to a single domain and the requests will be distributed over the targets. With A records, you must direct all clients to a single server and setup a proxy to handle your requests.

The decision on using WWW or not should be based on your needs. In both cases, it’s nice to have a permanent redirect to the main domain, in order to avoid multiple URLs to the same content.

First!

What should be in the first post of this blog? “Hello world” is too cliché. An introductory text won’t add anything to its contents. Throwing up a random post wouldn’t help at all. So, what should be on my first post? I don’t know. Let’s something:

I’m a Computer Science student from Brazil (I don’t like soccer, samba or beaches), who admire the great power of programming, especially how the C and C++ languages are fundamental to our world (do you really want to know more about me?).

The following piece of code is based on an example from the book C Programming Language (written by Brian Kernighan and Dennis Ritchie, who created the language). It has popularized an expression used almost everywhere, from programing, to blogging…

#include <stdio.h>

int main() {
  printf("hello, world\n");
  return 0;
}
view raw hello-world.c This Gist brought to you by GitHub.