PDA

View Full Version : no www 301 Redirect or 302 Object moved for domains



incrediblehelp
04-10-2005, 11:25 PM
I was wondering what is everyone opinion on doing a 301 Redirect or 302 Object moved command for your domain name without the www? I am seeing more and more people setting up these commands for the domain name without the www. I assume this is to basically let the engines know that the primary domain is the one WITH the www and the IBL value should be weighted on the www domain only. This should also avoid the search engine using the domain without the www in the search results which can be a nuisance as well.

For instance do a header check for this domain, Intranets.com.

So why are not more of us doing this?

bhartzer
04-11-2005, 02:02 PM
I assume this is to basically let the engines know that the primary domain is the one WITH the www and the IBL value should be weighted on the www domain only. This should also avoid the search engine using the domain without the www in the search results which can be a nuisance as well.
This is exactly correct. You should either not allow anyone to get to the non-www version of the domain or set up a 301 from the non-www to the www subdomain (www, after all, is a subdomain).

I have seen too many cases where sites suddenly lost rankings due to the fact that the search engines suddenly decided to list the non-www version rather than the www subdomain. The search engines are "supposed to" figure it all out, but often-times they don't.

So why are not more of us doing this?
We just don't know that it's an issue--until your site suddenly vanishes from the rankings.

adbart
04-11-2005, 05:52 PM
Everyone should do this.

Considering the fact that the vast majority of websites have adopted the 'www' subdomain idea, you'd think that the search engines automatically went with it, rather than the straight domain. Interesting point though.

incrediblehelp
04-11-2005, 05:58 PM
I am going to implement them on all my websites right now. I wonder why http://webproworld.com doesnt have one installed.

adbart
04-11-2005, 06:03 PM
Maybe they'll do it now ;-)

incrediblehelp
04-11-2005, 08:01 PM
Does anyone know how to do this type of redirect in IIS? I tired it in the IIS manager console and the domain just kept doing a loop to itself.

brianzajac
04-11-2005, 11:19 PM
Does anyone know how to do this type of redirect in IIS? I tired it in the IIS manager console and the domain just kept doing a loop to itself.

I'm not sure if this will answer your question. But in IIS, you'll need to make sure that when you set up a new website in IIS, make sure that you click "advanced" in the IP address field under the 'web site' tab. In there, make sure that you have two IPs listed: one that has a host header value of yourdomain.com and another one that is www.yourdomain.com. Also, make sure your redirect is a 301 and not a 302. Google tends to like 301s much better. For more info on redirecting, visit http://www.webconfs.com/how-to-redirect-a-webpage.php

incrediblehelp
04-11-2005, 11:42 PM
Yeah I have handled redirects before for files and different domain names, but this is something I havent done before.

incrediblehelp
04-12-2005, 02:24 PM
Can someone please post clear instructions on how to do this in both IIS and Apache platforms?

Remember this redirect is only concerned with redirecting a domain, domain.com to www.domain.com.

I am more concerned with how to do in IIS, this is where I am confused.

incrediblehelp
04-12-2005, 04:56 PM
for apache you can use this in your .htaccess file:

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

incrediblehelp
04-12-2005, 05:16 PM
For a IIS you will need either ISAPI_Rewrite or IIS_Rewrite installed and running. Once it is you can then make changes to a file called "httpd.ini", which is similar to that .thaccess file in Apache.

Google for "ISAPI 301 Redirect" and you'll find loads of tutorials.

Finally I found the solution!

incrediblehelp
04-12-2005, 06:25 PM
This ASP method can also be used in IIS:

http://www.seoconsultants.com/tips/asp/301.asp