vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

Results 1 to 12 of 12

redirecting http://example.com to http://www.example.com

This is a discussion on redirecting http://example.com to http://www.example.com within the General Discussion forums, part of the vBulletin SEO Discussion category; As most of you know it's good practice to not have 2 identical URL's for the same content. Now, after ...

  1. #1
    Senior Member dutchbb's Avatar
    Real Name
    ---
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    761

    redirecting http://example.com to http://www.example.com

    As most of you know it's good practice to not have 2 identical URL's for the same content.

    Now, after reading this: URL Redirect and this: SitePoint Blogs » example.com vs. www.example.com… trouble!

    I decided to redirect my homepage.com to HomePages

    But I can't get it to work, this is the content of htaccess:

    Code:
    Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} !^www|supplementen|forum|bodybuilding\.dutchbodybuilding\.com RewriteRule ^(.*)$ http://www.dutchbodybuilding.com/$1 [R=permanent,L]
    
    What's wrong with it? I dont want to redirect my subdomains, only the "non-www" version of the homepage.

    Thanks

  2. #2
    Senior Member dutchbb's Avatar
    Real Name
    ---
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    761

    Re: redirecting http://example.com to http://www.example.com

    BTW what a great new feature those automatic url titles! Can't wait to use those on my board when the new server is installed

  3. #3
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,367

    Re: redirecting http://example.com to http://www.example.com

    Hello,

    the simpler redirection rule for you is:
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^dutchbodybuilding\.com
    RewriteRule ^(.*)$ http://www.dutchbodybuilding.com/$1 [R=301,L]
    
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Pre-Release)- Released for your Evaluation


  4. #4
    Senior Member dutchbb's Avatar
    Real Name
    ---
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    761

    Re: redirecting http://example.com to http://www.example.com

    Great, finally one that works Tnx Oleg

  5. #5
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,983

    Re: redirecting http://example.com to http://www.example.com

    I'm a big fan of the opposite.... no www's. They aren't needed anymore.


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

  6. #6
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,849
    Blog Entries
    9

    Re: redirecting http://example.com to http://www.example.com

    I tend to agree Brian. Shorter is better.

  7. #7
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,849
    Blog Entries
    9

  8. #8
    Senior Member dutchbb's Avatar
    Real Name
    ---
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    761
    Quote Originally Posted by briansol View Post
    I'm a big fan of the opposite.... no www's. They aren't needed anymore.


    RewriteCond %{HTTP_HOST} ^www\.yoursite\.com
    RewriteRule (.*) http://yoursite.com/$1 [R=301,L]
    All the big sites (google, yahoo, msn, etc) use the www and redirect to that, so I tend to follow that. Also most internet users are now used to www, so it's only logical to not confuse them. I also do not believe www will ever go away.

  9. #9
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,983
    google.com doesn't even pass the w3 validator for basic html, uses basic css inline, and so many more non-standards errors.
    [Invalid] Markup Validation of http://www.google.com/ - W3C Markup Validator

    but, didn't you spend hours upon hours making your site validate?

    using them as an example is pretty much what you don't want to do.

  10. #10
    Senior Member dutchbb's Avatar
    Real Name
    ---
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    761
    Well I still disagree as this is not really about strict coding (what major site does pass the validator anyway?), that is a completely other subject. This is about user experience and what they are used to. It makes sense to follow the standard -> majority (even if you personally believe that standard is wrong) because users expect to see what they see most (blue underlined text for links, links opening in same window, etc...).

    Also AFAIK, the W3C has not made it clear what the correct way is, it's basically a free choice. In fact, they use the WWW themselve: http://www.w3.org/

  11. #11
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,983
    [Valid] Markup Validation of http://wikipedia.org/ - W3C Markup Validator

    wikipedia does

    And then we all wonder why they rank #1 for like, everything


    back on topic:
    www vs. non www – How should I structure my URL?

    comment #3 makes a really good point

  12. #12
    Senior Member dutchbb's Avatar
    Real Name
    ---
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    761
    Wikipedia though, strangely enough, is using both URL types: Wikipedia and not redirecting to either one. And isn't that pr leaking according to some SEO experts ?

    But yeah, both can be defended.

Similar Threads

  1. Redirecting to Wrong Thread
    By JohnScott in forum Bug Reporting
    Replies: 2
    Last Post: 04-19-2006, 03:23 AM
  2. Redirecting
    By emin in forum General Discussion
    Replies: 16
    Last Post: 12-31-2005, 05:30 AM