.htaccess redirect necessity?

by poppybaby 16 replies
Hi there all,
I recently ran a site through one of the online SEO tools and it suggested that I need a permanent redirect so that SEngines would give my site full crdit rather than splitting up between the www and no www.. However, my sitemaps all have www and any mention or links out there all include the www.
Should I add this redirect to my .htaccess (wordpress site)? What do you all do about this?

Thank you
poppybaby
#search engine optimization #htaccess #necessity #redirect
  • Profile picture of the author Mikedb
    then do a 301 redirect to the www part!

    regards,

    Mike
    Signature
    {{ DiscussionBoard.errors[2995957].message }}
    • Profile picture of the author poppybaby
      Originally Posted by Mikedb View Post

      then do a 301 redirect to the www part!

      regards,

      Mike
      I can do that sure, but is it really something that's necessary? Do you do it? Thanks.
      {{ DiscussionBoard.errors[2995994].message }}
  • Profile picture of the author Mikedb
    Yes I do.

    I will always choose one!

    better for SEO

    Regards,

    Mike
    Signature
    {{ DiscussionBoard.errors[2996001].message }}
    • Profile picture of the author orvn
      Originally Posted by Mikedb View Post

      Yes I do.
      I will always choose one!
      better for SEO
      Regards,
      Mike
      As do I - for every domain I use.
      I also do a lot of mod rewrite with .htaccess.

      Mike, while ambiguous in omitting the reasoning behind his advice, is correct.

      Here's the logic:
      The 301 redirect is not as much for your own site (you mentioned a sitemap), as it is for direction of backlinks.
      You may link-build everything with a www prefix, but not everyone linking to you will care about that. This means that search engines will count http://www.you.com and http://you.com as different sites, the same applies to their respective links.

      Since you want to relay credit for all your backlinks to a single domain, NOT performing a 301 redirect is a huge SEO leak.

      Always do this.
      Signature
      Orun Bhuiyan[@orvn] [linkedin] See what I've been doing lately by visiting my marketing agency's site. SEOcial specializes in content marketing and integrated optimization. We create conversions for businesses by gracefully connecting the realms of design, development and marketing.

      {{ DiscussionBoard.errors[2996146].message }}
      • Profile picture of the author Mikedb
        Originally Posted by orvn View Post

        As do I - for every domain I use.
        I also do a lot of mod rewrite with .htaccess.

        But I think Mike is omitting the reasoning here.

        The 301 redirect is not as much for your own site, as it is for direction of backlinks.
        You may link-build everything with a www prefix, but not everyone linking to you will care about that. This means that search engines will count http://www.you.com and http://you.com as different sites, the same applies to their respective links.

        Since you want to relay credit for all your backlinks to a single domain, performing a 301 redirect is key. Always.
        agreed.

        that is a factor too

        regards,

        Mike
        Signature
        {{ DiscussionBoard.errors[2996168].message }}
        • Profile picture of the author poppybaby
          Thanks to everyone here, when I make the change to the .htaccess should one expect any "dancing" or "correcting"?

          And I will do it and report back as well.
          {{ DiscussionBoard.errors[2996207].message }}
          • Profile picture of the author orvn
            Originally Posted by poppybaby View Post

            Thanks to everyone here, when I make the change to the .htaccess should one expect any "dancing" or "correcting"?

            And I will do it and report back as well.
            Before you apply your redirect, go to Backlinks Checker Tool - Backlink Watch
            and check the quantity of backlinks for your site with www and without.

            These two quantities will be added together upon your 301 redirect and this may trigger a repositioning, but as Mike says, dancing should be minimal.
            Signature
            Orun Bhuiyan[@orvn] [linkedin] See what I've been doing lately by visiting my marketing agency's site. SEOcial specializes in content marketing and integrated optimization. We create conversions for businesses by gracefully connecting the realms of design, development and marketing.

            {{ DiscussionBoard.errors[2996240].message }}
  • Profile picture of the author gtk29
    Google also suggests that you redirect non-www to www. It is better for search engines.
    {{ DiscussionBoard.errors[2996149].message }}
    • Profile picture of the author Mikedb
      Originally Posted by gtk29 View Post

      Google also suggests that you redirect non-www to www. It is better for search engines.
      That is not true.

      Regards,

      Mike
      Signature
      {{ DiscussionBoard.errors[2996161].message }}
  • Profile picture of the author Mikedb
    Dancing should be minimal.
    Don't worry!

    Regards,

    Mike
    Signature
    {{ DiscussionBoard.errors[2996218].message }}
  • Profile picture of the author amriednbelly
    This does not work for IE7. While the address bar https said when I got yesterday in the directory not recognize it as a secure page, LOCK appears at first, but then disappears.
    {{ DiscussionBoard.errors[2998599].message }}
    • Profile picture of the author scott g
      I posted this the other day on a similar thread. This IS your solution:

      "
      If you use the non-www version use this code
      HTML Code:
      RewriteEngine On
      RewriteCond %{HTTP_HOST} !^seo-consultant-services.co.uk$
      RewriteRule (.*) http://seo-consultant-services.co.uk/$1 [R=301,L]

      The code above will 301 redirect the www version to the non-www version. Obviously replace seo-consultant-services and co.uk with your domain name/tld.
      Download the 301 redirect code in a pre-made .htaccess file and edit to your needs.

      From 301 Redirects and www/non-www Canonical Problems


      CHEERS!

      "
      CHEERS!
      Signature
      scott g
      "Whatever the mind can conceive and believe, the mind can achieve."
      Law firm marketing St. Louis SEO Financial Advisor SEO National SEO Services
      {{ DiscussionBoard.errors[2998636].message }}
    • Profile picture of the author orvn
      Originally Posted by amriednbelly View Post

      This does not work for IE7. While the address bar https said when I got yesterday in the directory not recognize it as a secure page, LOCK appears at first, but then disappears.
      This is not happening because of IE7. In fact, it has nothing to do with your browser.
      Although you should probably get Firefox or Chrome or something that isn't IE, don't make me tell you why.

      The error is happening because the webpage in question is encrypted with SSL.
      https= hypertext transfer protocol secure = SSL = TLS 3.0
      All the same thing.

      By 301 redirecting an encrypted page, you've made apache (or whatever you're using) think that it maybe under attack.

      Your web server is frightened.
      Please, do not confuse your server this way. It does not enjoy this manner of mistreatment.

      Alternatively, if you really want encryption, you can do a layered redirect.
      http://www.askapache.com/htaccess/ss...-htaccess.html
      Signature
      Orun Bhuiyan[@orvn] [linkedin] See what I've been doing lately by visiting my marketing agency's site. SEOcial specializes in content marketing and integrated optimization. We create conversions for businesses by gracefully connecting the realms of design, development and marketing.

      {{ DiscussionBoard.errors[2998649].message }}
      • Profile picture of the author scott g
        Originally Posted by orvn View Post

        This is not happening because of IE7. In fact, it has nothing to do with your browser.
        Although you should probably get Firefox or Chrome or something that isn't IE, don't make me tell you why.

        The error is happening because the webpage in question is encrypted with SSL.
        https= hypertext transfer protocol secure = SSL = TLS 3.0
        All the same thing.

        By 301 redirecting an encrypted page, you've made apache (or whatever you're using) think that it maybe under attack.

        Your web server is frightened.
        Please, do not confuse your server this way. It does not enjoy this manner of mistreatment.

        Alternatively, if you really want encryption, you can do a layered redirect.
        htaccess HTTPS / SSL Tips, Tricks, and Hacks

        I can't stand IE 7! The only reason why it's still #1 is b/c when you buy a Windows computer Microsoft forces it down your throat! And "most" people (not people on this forum) don't go out and get the better ones like Firefox and Chrome.

        I recently had a problem with one of my sites - I'm not a web designer programmer, never had proper education/training in it... Just dibble dabbling in it. The site looked PERFECT in every browser EXCEPT IE!! Given I was working with XHTML Strict... It's all fixed now, but it was the most minuscule crap... Like IE couldn't take into consideration "aged" code... Whatever! I'm rambling now!
        Signature
        scott g
        "Whatever the mind can conceive and believe, the mind can achieve."
        Law firm marketing St. Louis SEO Financial Advisor SEO National SEO Services
        {{ DiscussionBoard.errors[2998682].message }}
  • Profile picture of the author orvn
    PHP Code:
    <!-[if IE 7]-->
    Look familiar?
    <![endif]--> 
    Don't get me started, this is one of the (many) reasons I have a mac.
    IE is great if you're looking to hack a browser maliciously.
    The whole activeX reliance garbage is so pointless.
    Signature
    Orun Bhuiyan[@orvn] [linkedin] See what I've been doing lately by visiting my marketing agency's site. SEOcial specializes in content marketing and integrated optimization. We create conversions for businesses by gracefully connecting the realms of design, development and marketing.

    {{ DiscussionBoard.errors[2998700].message }}
    • Profile picture of the author scott g
      Originally Posted by orvn View Post

      PHP Code:
      <!-[if IE 7]-->
      Look familiar?
      <![endif]--> 
      Don't get me started, this is one of the (many) reasons I have a mac.
      IE is great if you're looking to hack a browser maliciously.
      The whole activeX reliance garbage is so pointless.

      Wah... Wah .... Wahhhhhhh.... Yes. Why? Why?! This type of crap is going to keep their numbers dropping...

      I wish I had more experience and knowledge of Macs... And their prices dropping :p
      Signature
      scott g
      "Whatever the mind can conceive and believe, the mind can achieve."
      Law firm marketing St. Louis SEO Financial Advisor SEO National SEO Services
      {{ DiscussionBoard.errors[2998748].message }}

Trending Topics