www.example.com vs example.com
I recently purchased a hosting plan from one of the service providers. They offered a free domain-name to me and I gladly purchased it.
Now I logged into their control panel and put all my files there and then my site became online and is working fine.
I observed yesterday that when I hit www.domain-name.com or domain-name.com, the site displays correctly. But I had thought that when I hit domain-name.com, it will get redirected to www.domain-name.com which is not happening. Also I read in internet wherein some people say the two are different.
I am really confused regarding this. Are www.domain-name.com and domain-name.com different? If yes, how do I set up a redirect such that all domain-name.com requests redirect to www.domain-name.com?
I also want to know where do I setup the redirection ??