Results 1 to 5 of 5

Thread: .htaccess and redirect for SEO

  1. #1
    User
    Join Date
    06-20-09.
    Location
    Middlesbrough, UK
    Posts
    246

    Default .htaccess and redirect for SEO

    I've been reading about SEO and found it is recommended to redirect all http://domain.com domains to http://www.domain.com.

    this can be done a few ways. the one i'm trying out is doing it via .htaccess.

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

    more info can be found here: http://www.stonetemple.com/articles/301-redirects.shtml

    Thought people may find it useful, i'm going to try this out for a while on one site and then if successfull wiill use it as part or every .htaccess file.

    Does anyone have any experience with this and is it worth adding to the default typolight .htaccess file as standard?

    Ben
    360fusion: Virtual Tours - Web Design
    Social Media: Twitter - Facebook Page

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: .htaccess and redirect for SEO

    Hi Ben,

    We use this method for every site we produce.

    It is critical, as search engines including Google treat a domain with and without www. as two entirely separate domains.

    The effect of this is that potentially you are dividing your domain strength by two, and of course have two duplicates of each page of your site, leaving Google to decide which is the most important and should rank highest. Both pages could be ranked on page two of the results pages, but if your method is adopted then one page could be pushed to page one.

    Although posted in 2007, I explain this better here http://www.phoenixrealm.com/duplicate-content-problem/ and it's still relevant.

    I would like to see it added to the default .htaccess

    Gary

  3. #3
    User
    Join Date
    06-20-09.
    Location
    Middlesbrough, UK
    Posts
    246

    Default Re: .htaccess and redirect for SEO

    Hi Gary,

    I'll definitely be using this in all my .htaccess files from now on.

    I like your accessibility features on your website. http://www.doublespark.co.uk/

    Can this be achieved in Typolight websites?

    Did you code it all yourself or is it available somewhere on the web?

    Cheers
    Ben
    360fusion: Virtual Tours - Web Design
    Social Media: Twitter - Facebook Page

  4. #4
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: .htaccess and redirect for SEO

    Hi Ben,

    It is all bespoke coding. We are intending to launch an updated site later this year using TL and it probably will not have the same accessibility features. Mainly just because it's time for a change, as I'm sure same thing can be achieved with TL.

    It's been a few years but I remember we started with a search for "css style switcher". I can see there are more modern php only solutions available, if I was to try this again I would look at that and reduce the reliance on JavaScript as much as possible. Big fan of jQuery so would also look at that for what was needed.

  5. #5
    User
    Join Date
    07-01-09.
    Posts
    91

    Default Re: .htaccess and redirect for SEO

    I'm more in favor of the reverse. Make all www.domain.com requests goto domain.com. To me, www is a relic that is unnecessary in the modern web.

Bookmarks

Posting Permissions

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