Forum Moderators: open

Message Too Old, No Replies

links to domain.com vs. www.domain.com

Aftermath of htaccess 301 redirection

         

khuntley

2:38 am on Jun 26, 2003 (gmt 0)

10+ Year Member


Background: I put up a new site as of mid-Feb and spent two months on SEO specifically for google. At that point from experience I knew I should rank around four or five after the next update. Dominic hit and the site moved to around 200 for a moderately competitive search term.

Having been around for a while and knowing that Dominic was a little different, I knew to play it cool and wait.

I then saw the start of Esmerelda and saw only minor fluctuation in ranking of 180-210. At that point I knew that there must be something wrong. I then saw that DMOZ linked to me at http://domain.com, and I had all higher internal pages also not using www in link to index due to a hotkey I assigned to homepage URL text leaving out www. I added www in internals and added the following to htaccess:

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

Two days later, on Thursday of last week during the update, the site skyrocketed to number 4, for a moderately competitive search term on some of the datacenters (due to freshie finding the redirection?). I'm sorry I can't remember whether or not it was the datacenters with or without the new update.

Four days after that, on Monday, the site dropped to around 200 again on all datacenters.

Some additional info...several hundred internal pages rank very well for their terms; it's just the index that I can't get up there for the main search term.

So the question is, was dropping back due to freshie finding the redirect and temporarily causing the #4 ranking and everything will be fine assuming something like another traditional update? Are there other steps I should take? With the background info I provided was the problem in fact due to the missing www in internal and external links?

I found dozens of posts lately about what to do to fix the missing www prob (I knew how to do that) but nothing about the aftermath. And I know Brett has some experience with this and WW...any thoughts Brett, or others?

Thanks in advance,
Kevin

WebMistress

5:53 am on Jun 29, 2003 (gmt 0)

10+ Year Member



It didn't take long to paste www. in all the right places...and there were a lot.

One thing I also discovered for anyone considering a rewrite in htaccess to handle the www vs. non-www is make sure all forms on your site have www version for action. Thank God all mine did except 1. Lesson, make everything www always! Does that sound like the right lesson?

WebMistress

5:56 am on Jun 29, 2003 (gmt 0)

10+ Year Member



Now what will be interesting to watch with this rolling-whatever index that acts faster than usual to new sites, so hoepfully new changes such as mine, is how long it will take google to catch on and fix their index. SOON, I hope!

jdMorgan

6:32 am on Jun 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Webmistress,

Yes, all sorts of interesting changes. I moved a small, low-PR site to a new IP yesterday, and Googlebot crawled it today. What happened to the old, "Googlebot's still using my old IP address after 3 weeks" problem? Maybe that's one of the recent improvements from FreshDeepBot!

I'm watching the threads here closely, but I don't think it matters whether you go with www- or non-www. Just pick one and use it with utter consistency. The non-www is shorter, but people are used to www. The non-www makes a branded domain name more prominent by "uncluttering" it, but "www." serves as a visual cue that it's a Web address on a printed page and an auditory cue that an announcer is about to read a Web address. Non-www is easier for type-in, www is what we're used to. Hundreds of reasons to go either way. Want a solid answer? Do market studies and conversion tracking.

Jim

WebMistress

6:53 am on Jun 29, 2003 (gmt 0)

10+ Year Member



jdMorgan,

I think part of my being indexed with both domain.com and www.domain.com was from moving to a new IP. I left my site on both to make sure google didn't lose me, and for a few weeks, google crawled both. I didn't get lost though, so maybe it was good thinking (advice from those here at WW) to do both servers, especially considering I did the move right as Dominic began. Hope your transition to a new IP is smooth.

g1smd

8:31 am on Jun 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> It didn't take long to paste www. in all the right places...and there were a lot <<

Can be a lot quicker with selective Find and Replace in a text editor.

claus

11:59 am on Jun 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jdMorgan, thanks a million for this opinion:

Just pick one and use it with utter consistency

Really, i think consistency is key as well, and the 'net is full of special cases (just as always :-)

In my own special case, i didn't even have the CNAME with www in my DNS-setup for a while - i only put it in because, as you said "people are used to it", and i thought it would be userfriendly towards the less www-savvy part of my audience. This implies that a visitor would simply get a 404 when trying to use the domain with www - in this case, a redirect makes more sense.

/claus

DavidT

4:52 pm on Jun 29, 2003 (gmt 0)

10+ Year Member



Someone from Microsoft Network must be reading this forum, msn.com is now redirecting to www.msn.com, sure it's new.

khuntley

5:06 pm on Jun 29, 2003 (gmt 0)

10+ Year Member



DavidT,
Makes sense to me...for each of us that scrutinizes every little change in the engines there must be an army up in Redmond, WA.

And there are most definately changes recently in how google handles this issue. So it's no surprise at all if major sites will quickly start to stick to www. It should be interesting to watch.

Kevin

mmr82

12:32 am on Jun 30, 2003 (gmt 0)

10+ Year Member



Guess what, I hired some one to do it for me. He edited the .htaccess file and added

RewriteEngine On
RewriteCond %{HTTP_HOST}!^www.home-based-business-opportunities-guide.com [NC]
RewriteRule ^(.*)$ [home-based-business-opportunities-guide.com...] [R,L]

Is that correct? Just to make sure ;)

WebMistress

1:50 am on Jun 30, 2003 (gmt 0)

10+ Year Member



Follow-up on my redirect in htaccess....now I find all graphics are messed up. Had to delete the redirect in htaccess, because all graphics were written as <img src="http://domain.com/images/image1.com"> so redirecting domain.com to www.domain.com made all graphics disappear. This seems so odd. So, now it looks like I can't redirect to take care of both domain.com and www.domain.com being indexed. Any suggestions of a different rewrite for htaccess?

DavidT

2:06 am on Jun 30, 2003 (gmt 0)

10+ Year Member



Do a Find and Replace job as suggested above and replace every single instance of domain.com in your pages with www.domain.com.

WebMistress

2:11 am on Jun 30, 2003 (gmt 0)

10+ Year Member



Ahhh, DavidT, good idea! I'm so frustrated with this problem while completely disappearing again in the SERPs that I can't think straight....thanks for thinking for me, ya'll!

James_Dale

11:19 pm on Jul 3, 2003 (gmt 0)

10+ Year Member



Just like to resurrect this thread and say that since putting a mod_rewrite in place, my site is back at the top of all datacentres (from being nowhere on any!)

This just happened. Really chuffed!

Khuntley, I can report a similar experience to yours now. First it reappeared in one centre, then two or three, and so on, until finally I'm back on all 9. Excellent stuff.

Also, when I search for domain.com, I no longer appear to get the straight [domain.com...] in the results. It seems the domains are now consolidated. what a relief!

jdMorgan

11:50 pm on Jul 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mmr82,

> Is that correct?

No, not quite. Your posted code does a temporary redirect, which G will ignore. Use {R=301,L] to specify a permanent redirect. Also, your code ALLOWS uppercase and mixed-case URLs to go unredirected, because of the [NC] in the RewriteCond. I doubt you want to allow those URL variants to propagate.

Try:


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.h-b-b-o-guide.com
RewriteRule ^(.*)$ http://www.h-b-b-o.com/$1 [R[b]=301[/b],L]

And please remember that posting your site's URL is against the terms of service here...

HTH,
Jim

mmr82

1:48 am on Jul 4, 2003 (gmt 0)

10+ Year Member



jdMorgan,

Thanks a lot for your reply, Changes are done :)

Sorry about the URl, but the "Edit" botton just disappeared in the above post!

DavidT

6:51 am on Jul 4, 2003 (gmt 0)

10+ Year Member



I notice differences in the syntax all the time for these things. I am using:

RewriteCond %{HTTP_HOST}!^domain\.com
RewriteRule ^.*$ [domain.com%{REQUEST_URI}...] [R=301,L]

Ignoring the fact that I am doing the opposite of above, that is forcing things to domain.com without www, is this variation technically correct? It definitely 'works' in a practical sense.

claus

7:59 am on Jul 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



differences in the syntax

That's mainly because the scripting language isn't very strict. Things tend to be possible to do in a variety of ways.

<added>That is: There's always more than one way of doing things (even technically correct)</added>

Your example could be written in other ways (all these examples can), but if it works (and it should) then it ain't broken, so why fix it? ;)

This 47 message thread spans 2 pages: 47