How 3 Lines of Code Can Improve Your Rankings
Scott is the CEO and founder of Red Sand Marketing, a San Diego SEO and web design firm. A dynamic mix of marketer, designer, and developer, he thrives on all aspects of internet marketing and web development. Having been involved in search engine optimization and web design since 1996, he and his team consistently achieve top search engine rankings for clients in competitive markets, and have won multiple web design awards along the way.
In addition to the .htaccess method you may want to indicate which www or non-www method in the google webmaster tools.
What about the issue where I have a master hosting account, then have subdomains under it? For example, my main site is www.harnesshouse.com. I have a subdomain called finearttouch.harnesshouse.com. I also have www.finearttouch.com pointing to that. Every now and then I’ll see a search result that points to finearttouch.harnesshouse.com instead of www.finearttouch.com. Could I just do something like this:
RewriteCond %{HTTP_HOST} ^finearttouch.harnesshouse.com
RewriteRule ^(.*)$ http://www.finearttouch.com/$1 [R=301,L]
Glen
Thanks, nice post will Sphinn.
Yay! Excellent first post on SEG. Thanks for the simple tips and for explaining them in detail. It really helps those of us who have no clue what you’re talking about understand better. Plus, my freebie preview lesson helped me understand it even more. 😉
@Chris Estes: Yes, that is absolutely true, it’s a decent backup option. I don’t recommend relying on that or other third party solutions though because even though Google has the largest search engine market share, it won’t solve your problems with other search engines, and Google could potentially revoke that option at any time.
@Glen Harness: Upon a quick glance at your code, that should work fine.
@Jeff Howard, @Rachel Phillips: Thanks!
Hey Scott! Nice to see you here (can finally see what you look like too lol I usually think of your Keanu Reeve’s avatar on the DP forum when I imagine what you look like)
Great post and tips. I use the Enforce WWW plug-in for my WordPress’ blog. A good solution for non-techie people who don’t want to tinker around with the htaccess file
@Michael: Hey! Good to see you here as well. Sometime ask me about why I chose that avatar of Neo – it will make you laugh. Thanks! That’s a great piece of advice for WordPress bloggers. Now if only there were plugins for websites in general. 🙂
OK, so what if I have other subdomains at the same level? For example, www.mysite.com and mysite.com are the same site, but foo.mysite.com and bar.mysite.com are different ones, but run from the same server. If I use the rule to rewrite mysite.com as www.mysite.com, will that affect resolution of URLs for the other sites?
I always think it’s best to use the www version to maximize SEO inbound links. People are used to typing in the w’s.
Scott,
I think that your approach would be valid until a few months ago. Matt Cutts puts the question around two years ago. In fact Google gave different pageranks to theese URLs, but currently no. The back links, as well the pageranks, are the same if you search them either with www or not, or if you use index (or default).
Great tip – thanks! Took me less than 5 mins and your instructions made it super easy! www here we come….
Is there a way to verify the need? I checked about 30 pages on my website and they all had the identical PR, whether www or not. I know this was an issue a while back, and the pr was different on most of my pages (non www was lower). But things keep improving and I wonder if it is still necessary. Selecting the preference in Google tools may have made the difference for PR, but as was mentioned, other search engines may not have a handle on this.
@Ruy I’ve generally been thinking the same thing lately about whether this is necessary anymore (I do it on all sites I work on by default). Just this week though I ran a link search for a client that returned different results with and without the www subdomain. Weird
Hi Scott,
Great tip, but it doesn’t work for me! Can you help?
Here’s my code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ http://example.com/
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
I checked with my ISP and they’re on apache.
I’m clueless.
Frak and Esoomllub,
Yes, I agree that we can find some differences with different tools. Even in the organic search the results may differ from a given search feature to other. But the point is: one URL had back links and PR, let’s say, 4, and the other URLs had not back links and the PRs were zero. In addition, I suppose that the cited differences will disappear over the time.
@Janet: You shouldn’t have any problems with subdomains because in most cases, rewrite directives of this kind in your main .htaccess won’t affect your subdomains. As always, test things out first.
@Get Clickz Blog: Personally I would normally agree on using the www version, but there some good reasons for using the non-www version as well. Using the redirect mentioned above will forward all links to the correct version, and search engines will eventually pass on any link value to the correct version.
@Emily: You’re welcome! Always glad to help. 🙂
@Ruy Miranda: I hear your point, but I would have to disagree. It’s still important and valid to use this method for a number of reasons. While Google continually does get better with issues like this, I maintain my point that it’s important to not leave it up to them, or any other search engine. You may see the same PageRank for sites with non-www and www, but I wouldn’t rely on that information alone. The value of incoming links is much stronger when they are directed (or redirected) to the same version of the site. Keep in mind, Google isn’t the only search engine. with sites that incoming links split between the two versions, I’ve seen rankings go up drastically (time and time again) within a short period of time of implementing only this fix, even recently. Also, it’s simple a best practice to not have multiple versions of your site from a usability point of view, and it will make it easier for people to link to you.
@Frak, @Esoomllub: You may not see a huge problem with only 30 pages, but it’s a lot easier to prevent SEO problems than to fix them afterward.
Scott,
Great article. Have a questions.. when i search my site I only get results with http://www.mysite.com not with the www
What does that mean? Thanks!
@Scott The site I noticed this with was a 19k page site. As I was saying though, this redirect is something I do by default on all sites that I am working on. Almost every site I’ve been brought in to do SEO work on though does not have this in place. As well, most of them don’t have the basics of SEO in place, which means a quick boost in rankings is often easy to attain.
Thanks, Scott, I’d read about this before but the directions were confusing. Good tip from Chris about Webmaster Tools as well. When I tried this the first time, (and did it wrong), my Webmaster account noticed. Thanks again, Jill
Dear sears,
I have 5 web sites, and want to construct a web portal which will unify all sites in one (on new location, same IP) with new unique content. After this (constructing a new portal) want to redirect all this domains (301 redirection), to new one, we presume that this will not affect our position on Google, is it possible for us that Google bann us from index, because of redirecting 5 domains to one? I know that 301 is a legal, but I found different opinions, like
“If you 301 several different domains/web pages to ONE single page,
that ONE single page will get humped and dumped by google with no
apologies. DONT DO IT!
If you’re already getting traffic from google, I would caution against
doing anything at all! If you do anything wrong with regards to
301/302/404, google will break it off in your culo and drop you so far
in the rankings that you will soon be on welfare.”
So if You be so kind to help I would appreciate.
Scott,
We have two different point of view: to me, currently a page with and without www has a unique version, not two. Out the area of PR the content in the two URLs is not view as duplicity by any search engine.
We have several sites on both IIS and apache servers. On the apache server, we are running phpsuexec so we cannot use .htaccess, how would we go about doing the above fix?
I’ve applied this successfully for a few web sites, but they were all .com sites. When I tried to use it for a .net sire, it fails to work.
Is there something special about non-.com sites?
Great site!! Steps are very clear and concise. I would like to learn more about the difference among different tools.
This is a great bit of code. I too am a fan of not having a third party do all the work for me. I’m more of a personal responsibility guy myself.
I’d have to say this works well still.
Noticed many more links found in google after implementing and pr a month or so later up 1 level. It takes so little time, and like Scott says, why leave this decision to the SE?
Lowell
Read by small business people, our newsletter delivers a digest of articles from the top search engine marketing experts. You will learn about:
Our newsletter is the perfect way to stay up to date with all of the latest trends, events and techniques in using search engines to grow your business and make more sales. Subscribe here. Your email address will NOT be given to third parties.
FreeFind Site Search Engine – FreeFind adds a “search this site” feature to your website, making your site easier to use. FreeFind also gives you reports showing what your visitors are searching for, enabling you to improve your site. FreeFind’s advanced site search engine and automatic site map technology can be added to your website for free.
Buy UPC Codes
Get your products listed online!
Search marketing information for small business owners.
Fetching the best small business news.
A friendly place to share small business ideas and knowledge.
Small business support through education, resources and community
The directory of the best small business sites and tools.
Copyright © 1998 – 2018 Search Engine Guide All Rights Reserved. Privacy
Research & References of How 3 Lines of Code Can Improve Your Rankings|A&C Accounting And Tax Services
Source
0 Comments
Trackbacks/Pingbacks