Submit Your Article Forum Rules

Page 1 of 2 12 LastLast
Results 1 to 10 of 38

Thread: What is the different between http://www.example and http://example.com

Hybrid View

  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    49

    Question What is the different between http://www.example and http://example.com

    Hi Guys,
    What is the different between http://www.example.com and http://example.com?
    I'm looking for technical explanation and also want to understand the SEO affects.

    In addition, what happen when I promote a site with inbound links to
    "http://www. example . com" and "http:// example . com".
    Does the link juice drain to one URL or two different ones?


    Thanks

  2. #2
    WebProWorld MVP incrediblehelp's Avatar
    Join Date
    Jan 2004
    Posts
    7,567

    Re: What is the different between http://www.example and http://example.com

    Pick one as your main domain that you want to internally link to and you want external websites to link to. Usually people pick the www one. Then 301 redirect the non-www to the www.

    You do this to avoid duplication/canonicalization issues with the search engines.

  3. #3

    Re: What is the different between http://www.example and http://example.com

    Search engines see
    www.yourdomain.com and
    yourdomain.com

    as TWO DIFFERENT pages. I use an .htaccess direction to send the non-www one to the www one.

    i.e.

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

    The only place this does not work well is on older servers (?) where the host directory is
    http_docs or where a previous webmaster has built some weird configuration. Maybe someone else can respond to that.

  4. #4
    Junior Member
    Join Date
    Oct 2008
    Posts
    27

    Re: What is the different between http://www.example and http://example.com

    Quote Originally Posted by sharonjackson View Post

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

    The only place this does not work well is on older servers (?) where the host directory is
    http_docs or where a previous webmaster has built some weird configuration. Maybe someone else can respond to that.
    It has nothing to do with having an older server and the document root is completely irrelevent. The only time this won't work is if a) you aren't running Apache, and b) you don't have mod_rewrite installed.

    More importantly that rewrite is pretty sloppy and leaves a lot of holes, here's a better way:

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

  5. #5

    Re: What is the different between http://www.example and http://example.com

    Great, but what if you are on a shared Windows server? Are we out of luck??

  6. #6
    Junior Member
    Join Date
    Oct 2008
    Posts
    27

    Re: What is the different between http://www.example and http://example.com

    Quote Originally Posted by carol View Post
    Great, but what if you are on a shared Windows server? Are we out of luck??
    Apache runs on Windows too. In fact it runs on most platforms.

  7. #7
    Senior Member
    Join Date
    Aug 2006
    Posts
    274

    Re: What is the different between http://www.example and http://example.com

    Quote Originally Posted by amnesia View Post
    It has nothing to do with having an older server and the document root is completely irrelevent. The only time this won't work is if a) you aren't running Apache, and b) you don't have mod_rewrite installed.

    More importantly that rewrite is pretty sloppy and leaves a lot of holes, here's a better way:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    RewriteCond %{HTTP_HOST} !^$
    RewriteRule ^/(.*) http://www.example.com/$1 [L,R=301]
    My site runs on an Apache server and sharonjackson's redirect works.

    Question: can you please elaborate on the "holes"? I'm not questioning you; I'd just like to understand the code.

    Thanks

  8. #8

    Re: What is the different between http://www.example and http://example.com

    It is up to you to decide whether you have the www or not. Most people prefer their domain name with www.

    As incrediblehelp says you should do a redirection from non www to www or from www to non www. This is to avoid duplication issues with search engines. If you have backlinks to www.example.com and example.com and if you have done the 301 redirection for www or non www version then you will have no problems.

  9. #9
    Junior Member
    Join Date
    Oct 2008
    Posts
    27

    Re: What is the different between http://www.example and http://example.com

    Quote Originally Posted by getmea View Post
    My site runs on an Apache server and sharonjackson's redirect works.

    Question: can you please elaborate on the "holes"? I'm not questioning you; I'd just like to understand the code.

    Thanks

    Yes it works, but only for urls that match the domain by itself, and only in a case-sensitive fashion. "Holes" was maybe a poor choice of words, I simply meant it leaves out a lot of other instances. With her rule, http://MyDomain.com/ would not get rewritten, and neither would http://site.mydomain.com/. By using:

    RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]

    you are saying that anything that does not match http://www.example.com/ (non case-sensitive) will be rewritten, so it covers all bases.

  10. #10
    Senior Member ron angel's Avatar
    Join Date
    Jan 2004
    Posts
    350

    Re: What is the different between http://www.example and http://example.com

    Quote Originally Posted by incrediblehelp View Post
    Pick one as your main domain that you want to internally link to and you want external websites to link to. Usually people pick the www one. Then 301 redirect the non-www to the www.

    You do this to avoid duplication/canonicalization issues with the search engines.
    I have found the simple way around this is to use the full
    SS Richard Montgomery matter on all internal & external links always.
    historical information links re uk and usa
    http://www.ssrichardmontgomery.com

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 18
    Last Post: 10-16-2009, 01:23 PM
  2. http://motiliti.net/oys_carrie.htm?s=http://www.instant-cash-center.com
    By overlander in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 12-19-2008, 01:33 PM
  3. How do I redirect http:// to http://www.
    By StephenR. in forum Search Engine Optimization Forum
    Replies: 19
    Last Post: 06-30-2005, 10:22 PM
  4. http://www. vs. http:// and google ranking
    By LdyAtavist in forum Google Discussion Forum
    Replies: 48
    Last Post: 10-20-2004, 01:36 PM
  5. http://searchwithmax.com and http://maxincommon.com
    By MaxInCommon in forum Submit Your Site For Review
    Replies: 1
    Last Post: 08-11-2004, 03:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •