-1

Possible Duplicate:
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 ??

4 Answers4

0

They are the same site, its mainly a relic of older systems when people had websites at www.domain.com and not at domain.com. It wont cause you any technical problems nowadays, however Google and other Search Engines will see the 2 as totally separate sites, despite them being one. This is generally bad as Google tends to rank this lower because of duplicate content issues.

If your shared hosting is Linux and Apache then the redirect is pretty simple, drop the following into a file called .htaccess (you may have to make your ftp client show hidden files to see it)

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
0

You can do redirection, or simply set your DNS entries to point both the @ and the www to the same place.

KCotreau
  • 3,461
-1

I am still getting my IT degree, but as far as I know the difference between the two is minimal and it should get redirected. It used to be a bigger problem and all but not so much anymore.

I have never worked with a purchased domain name/system.

If you had access to the server itself, you can change the DNS zone files on the machine. Which is done differently for Windows/Linux Distributions.

You might just want to look through the options that the service provider gives you.

Sorry if I am mistaken, I am still learning ><

-1

Well as far as i know about them, they are different and most of the hosting providers do provide both the domains for you but there are some providers with the lack of this kind of service. Basically this is done by the service providers. You may try to ask them for this feature. They may charge you some extra amount. The thing they will do is redirect both domains to your account.

Hopefully, you will find a solution after contacting to your service provider.