Would someone please create a
custom .htaccess file
301 Redirect pointing all calls using the the www
version to the non-www form.
for clearcanes.com that I can insert
so all my back links help my PR.

I found out how to access and edit the
existing hta file:

%2Fpublic_html%2F.htaccess

(apatche)

I saw the tutorals, but I'm not too quick on this.
What I tried didn't work
Need someone to write the exact code to insert.
I think it's one or two lines.

Recommended Answers

All 17 Replies

I did some research and found the code to do the opposite, which is to add the www, is:

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

However, it doesn't seem to work with subdirectories. Can anyone comment or help out with this? Thanks!

Seems to work, pointing all calls using
non-www to www form.
(adds the www)
Not exactly what I wanted, but it probably will even out
in a couple months. A bunch of thanks to you, cscgal.
Tried reversing placement of the www, and the status bar, kept
switching from www or non-www and back, with no page load.


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

Are you keeping it set up this way or should I still be on the lookout for the reverse? Personally, I always use www in domain names.

Keeping it this way, switching all links etc to www form.
PR dropped from two to 0 but, still have about same decent results from
my best search phrases. I know it will take a while to consolidate backlinks and even out. I want to thank you again, the seo places I tried to pay to do this didn't want to get involved with something so small.

Effects of 301 redirect update, a few days after:

Of couse Google PR dropped a couple points but search results for my best search terms are the same (lucite cane is still toward the bottom of the second page) I guess PR isn't everything, one site with the same product has a PR0 and is always in 1-3 spot on the first page.

Yahoo is a different story, I used be toward the top (1-3) of the first page,
Now many pages from the first, for "lucite cane/s "

This is interesting. I'm paying for my laziness in not filling in the www.

Check out a bunch of other posts on this forum about google PR. After any major changes such as this, I'd also give it about 2 weeks before you see any real Google effects.

Google is unstable from last 7-8 days after change of BL's So we cannot draw the conclusions till the dance or updates are completed

I had heard somewhere though that Google doesn't dance anymore. Instead, it's just a constant flow of small updates. All that happens is every X weeks the backlinks we see are updated and the google toolbar is updated with a newer PR - but in reality, G had been taking those things into consideration long before we got to see them.

Update:
About 10 weeks after 301 redirect
PR is back to 4 on most pages, not bad for my cheezy little site.
Search results and sales were quite decent during that time, and
is only a little better now.
Thanks, couldn't have done it without your help.

Would someone please create a
custom .htaccess file
301 Redirect pointing all calls using the the www
version to the non-www form.
for clearcanes.com that I can insert
so all my back links help my PR.

I found out how to access and edit the
existing hta file:

%2Fpublic_html%2F.htaccess

(apatche)

I saw the tutorals, but I'm not too quick on this.
What I tried didn't work
Need someone to write the exact code to insert.
I think it's one or two lines.

USE IT

The 301 directive is quite powerful. You can redirect not just single files but entire sites, e.g.

redirect 301 / http://www.you.com/

The first "/" indicates that everything from the top level of the site down should be redirected.

After the redirect, another think to check:

Any non-www image url's in froogle data upload
would result in no displayed image for that product, but
images displayed for the www form products.

A member of our forum pointed me to this code which works with subdirectories and subdomains. The only problem is it doesn't work with addon domains.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.rackchat\.com [NC]
RewriteRule ^(.*) http://www.rackchat.com/$1 [L,R=301]
</IfModule>

Hope this helps :)

Ahh thanx it is working, i have searched for the www to non-www so long :) Everybody uses opposit direction...

Why are you guys using the www's in url? It just makes more typing and waters down the keyword density of url's (very important ranking factor since before the caffeine update)?

OH and BTW: here's the code the original poster was looking for:

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

It does work on all sub-directories and files, even if there is a WordPress (or something similar) blog installed deep within as long as you don't make another .htaccess file that contradicts this in a subdirectory ...

RackChat's code above is almost on the money except it rewrite all www. urls to www url's which means it does nothing and may in fact cause a permanent loop (I didn't test it)

Please give me Information about canonical meta tags

Regards
Balu


I had heard somewhere though that Google doesn't dance anymore. Instead, it's just a constant flow of small updates. All that happens is every X weeks the backlinks we see are updated and the google toolbar is updated with a newer PR - but in reality, G had been taking those things into consideration long before we got to see them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.