1

Should we automatically convert www.example.com/abc.htm to example.com/abc.htm or vice-versa on the server side? Because user may type the site address with without www. Which is better?

EDIT: I'm asking because I'm writing many rewrite rules, so sticking to one is good I guess.

Abhijeet Pathak
  • 175
  • 1
  • 1
  • 8
  • Many duplicates. Here are a couple: [Technical/Programming/Non-SEO Pros and Cons of WWW or no-WWW?](http://stackoverflow.com/questions/839095/technical-programming-non-seo-pros-and-cons-of-www-or-no-www), [Should I default my website to www.foo or not?](http://stackoverflow.com/questions/355217/should-i-default-my-website-to-www-foo-or-not) – gnovice Sep 28 '10 at 14:28
  • Another interesting thread on the very same subject: [What’s the point in having “www” in a URL?](https://serverfault.com/q/145777/228297) – WhiteWinterWolf Aug 25 '15 at 11:44

2 Answers2

5

there is absolutely no technical reason for adding www to your website. Its your choice to go with or without www because many popular websites with www like google, facebook. These websites redirect

http://google.com to http://www.google.com

Also there are many websites without www like twitter, stackoverflow.com. These redirect

http://www.stackoverflow.com to http://stackoverflow.com

I think you can choose to add or omit www

One important point to note that

You should have a permanent redirect rule to redirect from

http://www.twitter.com to http://twitter.com

This is because if you have show the content for both www.twitter.com and twitter.com

Your search engine ranking would be split into two halves instead of twitter.com having 1000 ranks http://www.twitter.com would have 500 Ranks and http://twitter.com would have 500 ranks this spoils the popularity of the website.

Btw Search engines would understand the redirect rule.

indianwebdevil
  • 220
  • 1
  • 6
1

Whichever you like. In the old days, www.foo.com was preferred in order to distinguish web servers from ftp and other servers. Nowadays nobody really cares about that anymore. It's still good to accept both with and without the www prefix, though.