www VS http://

Discussion in 'Link Development' started by zibzer, Mar 19, 2006.

  1. #1
    hello,

    i have a website that gets all its link from http://largemouthbasstips.com

    but yahoo only has http://[B]www.[/B]largemouthbasstips.com

    does this matter? if so how would i 301 the www domain to the http domain? thanks!
     
    zibzer, Mar 19, 2006 IP
  2. Old Welsh Guy

    Old Welsh Guy Notable Member

    Messages:
    2,699
    Likes Received:
    291
    Best Answers:
    0
    Trophy Points:
    205
    #2
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^yourdomain\.com
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]


    That'll do it for you.

    Or reverse it if you want the 301 to go the other route.
     
    Old Welsh Guy, Mar 19, 2006 IP
  3. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Both forms of the URL reach your page. As long as this is true it does not matter and you do not need to do any redirects.

    Putting the "www." before the domain is the conventional way of expressing a URL. In recent years, more people have opted not to do so. However, disallowing its use is not a good idea, because many people put "www." before the domain name in a URL when typing it out by hand. If it does not work, they will not get the problem.
     
    clancey, Mar 19, 2006 IP
  4. Old Welsh Guy

    Old Welsh Guy Notable Member

    Messages:
    2,699
    Likes Received:
    291
    Best Answers:
    0
    Trophy Points:
    205
    #4
    Clancey, sorry but your wrong. Until Google sort out their canonical issues, it will treat
    www.domain
    domain.
    www.domain.com/index.php
    domain.com/index.php

    All as different pages and domains. As such, it will split your lihnk benefit across all those pages. This is why you should link to one set format ie www.domain.com or domain.com. Never hard code it to domain.com/index.htm as .htm .html .php .asp .cfm etc are all different pages in the eyes of the search engines.

    The ideal way to handle it is with local bind DNS at server level, but this is not always possible with certain hosting companies, and so a 301 is the only safeguard
     
    Old Welsh Guy, Mar 19, 2006 IP
  5. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    the code gave a 500 error.

    can i get a code that:

    redirects
    www.largemouthbasstips.com
    TO
    largemouthbasstips.com

    thank you for your help!
     
    zibzer, Mar 19, 2006 IP
  6. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    or what would u recomend
    ?
     
    zibzer, Mar 19, 2006 IP
  7. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    zibzer, Mar 19, 2006 IP
  8. Old Welsh Guy

    Old Welsh Guy Notable Member

    Messages:
    2,699
    Likes Received:
    291
    Best Answers:
    0
    Trophy Points:
    205
    #8
    The index.php is the default page that is being directed. If you put a .htm, or .html page there it would default to that as well The displaying of the /index.php page is handled by the server software, and will not affect the forwarding. The way you have done it is quite right.
     
    Old Welsh Guy, Mar 19, 2006 IP
  9. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I use the following to redirect from www.domain.com/index.php3 to www.domain.com and http://domain.com to www.domain.com

    RewriteCond %{HTTP_HOST} ^pyramidlinking.com
    RewriteRule (.*) http://www.pyramidlinking.com/$1 [R=301,L]
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php3\ HTTP/ 
    RewriteRule ^index\.php3$ http://www.pyramidlinking.com/ [R=301,L]
    Code (markup):
    Old Welsh Guy why do you not suggest this? I thought it was always needed?
     
    mad4, Mar 19, 2006 IP
    sagetips likes this.
  10. Old Welsh Guy

    Old Welsh Guy Notable Member

    Messages:
    2,699
    Likes Received:
    291
    Best Answers:
    0
    Trophy Points:
    205
    #10
    No reason,
    I have never used that as I have always used the other, and found it to work well.
     
    Old Welsh Guy, Mar 19, 2006 IP
  11. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    zibzer, Mar 19, 2006 IP
  12. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    mad4. when i use your code it says i have a redirection problem and it is a continuous loop
     
    zibzer, Mar 19, 2006 IP
  13. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #13
    hmmm, I cut & pasted right out of my working code.

    Have you put it in exactly the same order that I posted? Are there any other things in the htaccess file?
     
    mad4, Mar 19, 2006 IP
  14. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    if i put it in EXACTLY as you say substituting your domain for mine and substituting php3 to php it does not work at all.. no redirections take place

    if i add

    RewriteEngine On

    so it looks like this

    then i get the following error

     
    zibzer, Mar 19, 2006 IP
  15. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    and there is no other scripts in the HTACCESS file
     
    zibzer, Mar 19, 2006 IP
  16. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Sorry, if that doesn't work I can't help more. The following is my entire htaccess file for the pyramidlinking.com site which works fine :confused:

    ErrorDocument 404 http://www.pyramidlinking.com/404.php3
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^pyramidlinking.com
    RewriteRule (.*) http://www.pyramidlinking.com/$1 [R=301,L]
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php3\ HTTP/ 
    RewriteRule ^index\.php3$ http://www.pyramidlinking.com/ [R=301,L]
    Code (markup):
     
    mad4, Mar 19, 2006 IP
  17. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    thanks anyways for your help. i think i might call my hosting service and see why this isnt working
     
    zibzer, Mar 19, 2006 IP
  18. zibzer

    zibzer Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    well i managed to get around it by using

    notice there is not /$1

    now the only problem this causes is if you enter for example http://largemouthbasstips.com/articles.htm you get redirected to

    www.largemouthbasstips.com


    i will leave these rules and keep an eye on my raw data to se eif it causes any conflicts. thank you for all your help! and if you want to add something PLEASE DO :D
     
    zibzer, Mar 19, 2006 IP
  19. sagetips

    sagetips Peon

    Messages:
    239
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #19
    sagetips, Mar 19, 2006 IP
  20. CReed

    CReed Prominent Member

    Messages:
    3,969
    Likes Received:
    595
    Best Answers:
    0
    Trophy Points:
    310
    #20
    Try:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^largemouthbasstips.com\.com$
    RewriteRule (.*) http://largemouthbasstips.com/$1 [R=301,L]
     
    CReed, Mar 19, 2006 IP