1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

With and without WWW

Discussion in 'HTML & Website Design' started by nadlay, Jun 20, 2004.

  1. #1
    I've seen mention several times about PR being different for domain.com and www.domain.com

    Several commentators mentioned that this is because the search engines consider them each as different URLs.

    Before I came on this forum, I didn't even know you could have a domain without the WWW.

    How are such domains created?

    With all my domains, I have just created the account using WHM (Web Host Manager) and normally just put in domain.com in the domain box.

    Does this mean that all my domains should really be referenced as domain.com rather than www.domain.com?

    OR, have I got the worng end of the stick completely, and, as long as I consistently use www.domain.com in any backlinks, it isn't going to be relevant?
     
    nadlay, Jun 20, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    In Apache, you would simply configure it as a different site. And you would of course need a DNS entry for it as well.
     
    digitalpoint, Jun 20, 2004 IP
  3. schlottke

    schlottke Peon

    Messages:
    2,185
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #3
    basically www.domain.com and domain.com are the same thing (if you dont have them seperated.) if you have all of your links going to one or the other.

    Question for Shawn- How can you redirect a domain.com to www.domain.com so the PR from sites linking to that transfers over?
     
    schlottke, Jun 20, 2004 IP
  4. dsr771

    dsr771 Peon

    Messages:
    65
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The WHM server usually configures Apache so that your domain will work with and without the www. For best PR, you should pick one and always use the same form for all links and backlinks.
     
    dsr771, Jun 20, 2004 IP
  5. vinyl

    vinyl Well-Known Member

    Messages:
    302
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    165
    #5
    schlottke, let me take that down from shawns back :)

    you can use apaches mod_rewrite and setup 301 redirection rule.

    for instance, something like:

    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^digitalpoint\.com
    RewriteRule ^(.*)$ http://www.digitalpoint.com/$1 [R=permanent]

    in .htaccess should do the job.
     
    vinyl, Jun 20, 2004 IP
  6. Owlcroft

    Owlcroft Peon

    Messages:
    645
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Such a redirect, from the "deprecated" form to the "preferred" form (and which is which does not matter, just pick one) is something that every single website absolutely, positively should have in place.

    This is the third time just today that I have had occasion to post that, across two forums, so I guess it's not as nearly universal knowledge as it should be.
     
    Owlcroft, Jun 20, 2004 IP
  7. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #7
     
    ResaleBroker, Jul 4, 2004 IP
  8. l0cke

    l0cke Active Member

    Messages:
    178
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #8
    Try this:

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

    Works for me..
     
    l0cke, Jul 4, 2004 IP
  9. compar

    compar Peon

    Messages:
    2,705
    Likes Received:
    169
    Best Answers:
    0
    Trophy Points:
    0
    #9
    The way we do it on our FreeBSD/Apache server is to simply set up a symbolic link at the O/S level so that if anyone tries to enter domain.com they are taken to the content of www.domain.com. But we are very careful to have all links internal and external point only to the "www" version.
     
    compar, Jul 4, 2004 IP
  10. john_loch

    john_loch Rodent Slayer

    Messages:
    1,294
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    138
    #10
    Yep - consistency with linking will take care of it. But it pays to cover the bases just the same..

    Actually, if you take a look at your cpanel acct (as created under WHM) and open the file manager, you'll find that www is treated as a subdomain. It lives in acct root as a sym link (represented as a folder (www) in the file manager). So, you can reference your domains either as wxyz.com or www.xyz.com. The trick is to ensure that all links to your domain are either one OR the other. I'd be inclined to use mod_rewrite to redirect from wxyz.com to www.wxyz.com - there's plenty of info around on how to script mod_rewrite. :)
     
    john_loch, Jul 5, 2004 IP
  11. Owlcroft

    Owlcroft Peon

    Messages:
    645
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #11
    The crucial thing, I reckon, is that a 301 Redirect be issued by any call to the "wrong" URL form.

    The point is not to make sure that the visitor (or searchbot) finds your site--it would be rare for a call to one form not to "reach" the other--but that the searchbots see a 301 for the deprecated form, so that links from others (whose exact form we can never fully control) are all "counted" against the preferred URL form.
     
    Owlcroft, Jul 6, 2004 IP
  12. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #12
    Thank You! This is working great. I appreciate the help.
     
    ResaleBroker, Jul 6, 2004 IP
  13. kuhleen

    kuhleen Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    there is a simple PHP fix to the duplicated www. domain.com -> domain.com content problem on php9.com
     
    kuhleen, Sep 8, 2004 IP
  14. shacker

    shacker Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I think it's been the default behavior for many years at almost all web hosts to make domains accessible with or without the www. What surprises me in reading this thread is that the posted redirect rules reroute TO the www version rather than the other way around. www should be preserved for the few people out there who still habitually type www in front of everything, but I'd think the version without www would by far be the preferred form for its elegance and simplicity.
     
    shacker, Dec 12, 2005 IP
  15. Roman

    Roman Buffalo Tamerâ„¢

    Messages:
    6,217
    Likes Received:
    592
    Best Answers:
    0
    Trophy Points:
    310
    #15
    Just thought I'd mention this as I had a hard time finding it. If you want to use the non-www of your site place this into the .htaccess file of your www folder and your public_html folder:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^sitename\.com
    RewriteRule ^.*$ http://sitename.com%{REQUEST_URI} [R=301,L]
    Code (markup):

    ****note: replace sitename with your site name, leave out the http:// and the www
     
    Roman, Dec 12, 2005 IP
  16. Ellen C. Braun

    Ellen C. Braun Peon

    Messages:
    227
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Ellen C. Braun, Dec 12, 2005 IP
  17. wakeup

    wakeup Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Hi, I use in my web this .htacces

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.hhdirecto\.net [NC]
    RewriteRule ^(.*) http://www.hhdirecto.net/$1 [L,R=301]
    Code (markup):
    It run ok, but when I have a folder with another .htacces it don't do anything.
    thanks
     
    wakeup, Mar 10, 2006 IP
  18. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Use this ...

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^([^.]+\.com) [NC] 
    RewriteRule (.*) http://www.%1/$1 [R=301,L]
    Code (markup):
    It will redirect any request for any page without the www to the corresponding page with the www.

    :)
     
    Tam, Mar 11, 2006 IP
  19. wakeup

    wakeup Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I have tried it but when I go to
    hhdirecto.net/letras it redirect to
    www.hhdirecto.net//www/h/h/hhdirecto.net/htdocs/letras
    :(
     
    wakeup, Mar 13, 2006 IP
  20. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Who's post are you replying too?

    I should have added that you should place the .htaccess file in your web root (the folder which holds all of your web pages).
     
    Tam, Mar 13, 2006 IP