Forum Moderators: phranque
We've got it back in the number 1 position on most engines now, but the we don't seem to be able to consolidate the domain.com and www.domain.com urls. So we at least 2 pages showing this address on just about all the search engines.
I'd liked to find someway the we can fix this problem. Does anyone know how we can do this?
Thus, a user entering the site using [quux-corp.com,...] or [quux-corp.org,...] or any other variant that still landed on our server would get redirected to [quux-corp.com...]
Using the 301 permanent external redirect means that the URL gets "corrected" in the user's browser window, so the user is less likely to bookmark the wrong address. It also tells search engines spiders - the intelligent ones, anyway - that you have permanently moved the site. Some will update their index and re-spider the "new" correct domain, and some won't - or at least they won't do it quickly, as I've been waiting more than three months for a few of them to catch on.
Do a site search here on webmaster world for .htaccess and/or mod_rewrite for more info on how to implement this. If you're using Apache, follow the link to the Apache server documentation, and Engleschall's mod-rewrite application notes, too.
HTH, Jim
No problemo!
Hopefully we *all* learn something here... I know I do, just about every day!
(I'm starting to think WebmasterWorld needs a separate "mod_rewrite" forum!)
I didn't include this in my first post because it wasn't handy at the time, and I'd hate to misquote it. But in case anyone else sees this thread later, I use:
# Redirect non-standard incoming domains to www.quux-corp.org
RewriteCond %{HTTP_HOST} !^www\.quux-corp\.org$
RewriteRule ^(.*)$ [quux-corp.org...] [L,R=permanent]
in my .htaccess file for per-directory rewrites. It will also work in httpd.conf for per-server rewrites, if you have access to that file on your server (I don't).
Cheers! Jim
If there's a compelling reason to go "www-less", please do tell! Thanks!
The redirect shown above should work either way, just omit the "www" in both the rewrite condition and the rewrite rule lines. In my case - a specialty nonprofit site - it really makes no difference. I just wanted to "standardize" the URL used by visitors and by robots to make log analysis easier and to avoid "splitting" page rank on Google or its equivalent on other SEs, as discussed in the thread you cite above.
The method used in that thread is essentially identical, and will work the same way.
Jim
If there's a compelling reason to go "www-less", please do tell! Thanks!Well, if a potential Google penalty isn't enough to instill the fear of god into you then any argument I might make will be falling on deaf ears ;)
I really did it for consistency's sake than anything else. I had actually just moved domains at the time I had read the thread I mentioned above and the timing was right. People were asking me what to print on business cards, brochures, catalogs and annual reports, etc. and getting rid of that pesky www was just the thing the doctor ordered.
I had noticed that my log stats program was always differentiating between the www and www-less URL...now my logs are cleaner. I also like the URL to be as short as possible...now I've got 4 less characters in mine. In general I just didn't see the need for the www in the first place.
Then I came across a great article entitled Removing the Ws from URLs [webword.com] I think someone here recommended it that backs up my ideas and adds a few more reasons to go www-less.
I group web sites into three categories with respect to the Ws:
Bad: The site works only with the Ws or only without the Ws. (Incidentally, it's usually the former.)
Better: The site works with or without the Ws.
Best: The site works with or without the Ws, but automatically removes the Ws if they are in the URL.
I understand and agree that having two URL variants in a search engines index is a bad idea for several reasons. Regarding Google, it will dilute your page rank, dividing it up over the various URL variants.
But are you saying that there is a Google penalty specifically for having the "www" on your URL?
Or are you saying that having *two* different URLs in their index will result in an *additional* penalty above and beyond dividing up the page rank between the variant URLs?
My original "do tell" question was really intended to say, "If you use a redirect to "standardize" to a single URL, is there a compelling advantage to standardizing to 'quux-corp.com' over standardizing to 'www.quux-corp.com'?
I do see your point about having a shorter URL for both word-of-mouth and for printed marketing literature, but I was really thinking in terms of whether going "www-less" conferred a SE advantage.
I also wonder whether most people are now accustomed to the dub-dub-dub, and expect it to be there?
Thanks,
Jim
P.S. Nice to see that we rate a "Best" in your ranking system... :)
What I need to do is to get the old pages off some of the search engines, that seem not to be reading my .htaccess.
I believe the problem to be that they were submitted with "http://domain.com" versus "http://www.domain.com"prior to us taking over the site.
Currently we have a number 1 placement with the major SE's
some are showing the url as "www." others don't. So my biggest question is if I do this change, this redirect one way or the other, what will the ramifications be?
The engines don't "read" your .htacess file, per se.
The SE robot (or any user agent, like a browser) sends a URL - let's say it's your "wrong" URL - to your server, which then "runs" .htaccess. The RewriteRule matches the "filename" part, and so the RewriteCondition "domain string" is tested against the "desired" domain, and it does NOT match. Since the Condition is inverted (with the "!" meaning "not" on the front end), this means that the condition is satisfied. Therefore URL rewriting takes place.
The rewriting substitutes your "desired" URL for the incorrect one sent by the user agent, and performs an external permanent redirect. This means that a "301-Permanently Moved" status is returned to the user agent, and the user agent is instructed to re-issue the request with the provided "new" URL. All common browsers, and all of the "decent" search engine bots will do just that.
If you test this rewrite function by typing your "wrong" URL into your browser, you will actually see the URL change as the redirection takes place and your browser re-issues the request. This means users won't bookmark your "bad" URL, either.
If the user agent initially sends the URL you *do* want everyone to use, then the RewriteRule is not applied, and no redirect occurs - your server will just serve the requested page.
Now the bad news... You have to install the Rewrite, and then wait for the bots to spider your site and update their indices before you will have joy.
From recent experience it can take more than 90 days - I am still waiting for some of them. I am using a variant of this technique to accomplish both exactly what you want to do, and also to close down an old domain. The SEs that are the biggest problem, and haven't updated, are the ones that have gone to pay-for-listing, pay-for-indexing, etc. I'll wait another month, and then just dump them by shutting down the old site.<soapbox> If they won't include useful, but not-for-profit (and therefore penniless) sites like mine, they won't make it anyway. They gotta learn that people have many other uses for the 'net than just shopping!</soapbox>
Sorry for the delayed response - I find this forum highly addictive, and therefore MUST avoid checking in too often, or I won't get any work done! (Great site Brett, mods, & everyone)
If you use a redirect to "standardize" to a single URL, is there a compelling advantage to standardizing to 'quux-corp.com' over standardizing to 'www.quux-corp.com'?I think that the fact that you standardized for one or the other was my main point. If you look here at WebmasterWorld you'll see that Brett has gone the www route...if you take the www out, the server will add it back in.
My preference for www-less is just that, a preference, and from a usability standpoint it works fine for me. Whether you have www or not won't convey and higher ranking on any SE. I think we're trying to get away from giving the SE's the impression that we have content mirrored when we don't...I remember not so long ago I ranked #1-6 for my keyword and the URLs were:
[color=blue]http://mysite.com/index.html[/color]
[color=blue]http://mysite.com/[/color]
[color=blue]http://mysite.com[/color]
[color=blue]http://www.mysite.com/index.html[/color]
[color=blue]http://www.mysite.com/[/color]
[color=blue]http://www.mysite.com [/color] Whew! I kept lookin' over my shoulder for that Google pr0 that might be gainin' on me!
Yeah, I know what you mean about dumb-bots - I've been trying to get the engines to index my new domain and drop the old one. I'm using a 301 Permanent redirect on the old site to try to get the robots to do this.
Some of them indexed the new domain, and dropped the old one. Some of them indexed the new domain, but kept the stale index entry they had from previous visits as well. And some of them apparently don't know what to do with a 301 redirect at all; They just keep coming back to the old domain!
The first case is what I want. The second case is curable - I went into the old domain robots.txt and blocked the 'bots that had already indexed the new domain so that they will drop the old one next time around (I hope). The third case is driving me nuts!
And what's worse is that the majority of the dumb-bots are from pay-for-indexing type SEs. Can't pay, so nothing can be done unless they wise up (or take a new "feed" from ODP).
Anyway, thanks for that clarification - Now I don't need to worry about keeping "www" as my "standard" domain.
Jim