#1
  1. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Location
    New Jersey, US
    Posts
    81
    Rep Power
    14

    SEO for a static non-content website


    I think I may have messed up a little bit when I first made my website. At the beginning I noticed that Google only index mysite.com, not the www.mysite.com version.

    So I put a 301 redirect from the non-www version to the www version in my .htaccess file (the code I used is below). I didn't put any code into the pages themselves, just the .htaccess file.

    Also, I signed up with Google Webmaster Tools. I signed both sites into WMT's. I set my preferred site to the www version.

    The thing is, it still shows both the www version and non-www version in WMT's. Should it be like this? Should I delete the non-www version from WMT's? It's supposed to be just one site.


    Here's the code that I used for the redirect:

    Code:
    RewriteEngine onRewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
    RewriteRule .? http://www.mysite.com%{REQUEST_URI} [R=301,L]
    Last edited by Contra; Jan 27th, 2013 at 05:46 PM.
  2. #2
  3. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    5,712
    Rep Power
    1793
    Does it work in practice? I mean: if you surf to your page without adding www, is it added automatically?

    Also: why did Google choose to index the non-www version at first? Do all your backlinks (internal and/or external) point to the non-www version maybe?
  4. #3
  5. No Profile Picture
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Jun 2012
    Posts
    198
    Rep Power
    37
    You would need to sign in for www site in WMT and make it as preferred one. This one will do, you need not to have both www and non www account in WMT. In this way, google will look your site as www.mysite.com and any links pointing to your non www will count as link for www site.
  6. #4
  7. Busting SEOChat Spammers!
    SEO Chat High Scholar (3500 - 3999 posts)

    Join Date
    Jul 2009
    Location
    UK - Kent - Maidstone - PC!
    Posts
    3,754
    Rep Power
    1476
    Originally Posted by grgmathew
    You would need to sign in for www site in WMT and make it as preferred one. This one will do, you need not to have both www and non www account in WMT. In this way, google will look your site as www.mysite.com and any links pointing to your non www will count as link for www site.
    Have you used WMT? Have you set a preferred domain in WMT?

    Sorry to have to ask, but if you had done you would know that you need both the www and non-www versions added to your WMT in order to set the preferred domain!

    Also, if you cared to read what the OP posted you would know this has already been done, he has made the changes in WMT for his preferred domain, so maybe try having a read of the thread correctly before replying next time!

    Contra, you should leave both versions in your WMT, its standard for them both to be there and one will not hide when you set the preferred domain, so don't worry about it. Just click the preferred domain option in your WMT for the domain and it will show your preferred domain if its set.

    I'm not sure about your .htaccess code as I've not sure that one before, this is what I use on all my domains:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    New To SEOChat? See Here & the FAQ's

    "stupid people say stupid things, and smart people out smart each other!" SOAD
    301 Redirects | SEO Tools | Default htaccess | CuteRank
  8. #5
  9. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Location
    New Jersey, US
    Posts
    81
    Rep Power
    14
    Originally Posted by dzine
    Does it work in practice? I mean: if you surf to your page without adding www, is it added automatically?

    Also: why did Google choose to index the non-www version at first? Do all your backlinks (internal and/or external) point to the non-www version maybe?
    Yes it works in practice, if I type in mysite.com it redirects to www.mysite.com.

    I am not sure why Google indexed mysite.com first. I have no external backlinks and any internal ones don't use the domain in the href tag (/images/logo.png).
  10. #6
  11. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Location
    New Jersey, US
    Posts
    81
    Rep Power
    14
    NathanielB, that is exactly what I wanted to know. It just seemed odd to me that you would have both versions in WMT's for every website that you have listed in there, so I wanted to make sure that I was doing it right. It seems like small mistakes could lead to problems so I want to make sure that everything is right.

    Thanks again guys.
    Last edited by Contra; Jan 29th, 2013 at 08:20 AM.
  12. #7
  13. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Location
    New Jersey, US
    Posts
    81
    Rep Power
    14
    Quick question, should I make all changes to settings and everything else for BOTH versions of the website (www and non-www)? For example, should I submit a sitemap for both? Right now I only submitted a sitemap for the www version since that is the preferred,should I also submit it for the non-www version?
  14. #8
  15. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    5,712
    Rep Power
    1793
    Why would you want to do that?
  16. #9
  17. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Location
    New Jersey, US
    Posts
    81
    Rep Power
    14
    Originally Posted by dzine
    Why would you want to do that?
    I don't know

    NathanielB mentioned that it's standard for both of them (www and non-www) to be listed in WMT. So I am just curious if I have to make all the same settings for both.

Similar Threads

  1. Static vs Dynamic Content?
    By louarnold in forum Search Engine Optimization
    Replies: 16
    Last Post: Apr 27th, 2012, 03:57 AM
  2. Dynamic Content on a Static URL - Bad?
    By Cataclysmic in forum Google Optimization
    Replies: 3
    Last Post: Feb 21st, 2011, 06:34 AM
  3. Static Content vs Caffeine
    By Blue_Vision in forum Google Optimization
    Replies: 14
    Last Post: Jan 29th, 2011, 07:32 PM
  4. Wordpress Dynamic URL website vs Static HTML website
    By nairda in forum Google Optimization
    Replies: 1
    Last Post: May 24th, 2008, 07:40 AM
  5. Have dynamic website..needs static content
    By sharonsingh in forum Google Optimization
    Replies: 3
    Last Post: Sep 10th, 2005, 08:20 AM

IMN logo majestic logo threadwatch logo seochat tools logo