Forum Moderators: Robert Charlton & goodroi
I add to my .htaccess file, to redirect from the non-www, to the www. Replace the "sitename" with your Site Name.
________________________________________
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sitename\.com
RewriteRule (.*) [sitename.com...] [R=301,L]
____________________________________________
Feel free to e-mail me to get my site link info!
Back to watching
WW_Watcher
I would only give 1/2 a link for an incomplete answer, like the text, without the URL =)
Justin
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}!^www\.sitehere\.com [NC]
RewriteRule ^(.*) http://www.sitehere.com/$1 [L,R=301]
</IfModule>
Does anybody who did this (or something similar) know whether or not the page ranks goes up? For example with me
www.mysite.com is 5
mysite.com is 4
www.mysite.com/dir/ is 5
mysite.com/dir/ is 3
would anything increase?
You can do this on windows by using a software called ISAPI_rewrite. This is a component based url rewriting tool, similar to what they are describing for linux/unix. It is a basic isapi filter and it is fairly inexpensive, but some hosts prohibit it's use, you'll have to check w/ yours.
Once you have the tool you will you will have a httpd configuration file. In that file you will put something like:
RewriteCond Host: ^domain\.com
RewriteRule (.*) http\://www\.domain\.com$1 [I,RP]
[obvious - make sure that you are not putting links to the non-www on your web pages]
Beware of a 301 redirect from non-www to www where the defaultsitename is domain.com and where you are linking to a folder, and where you forget to add the trailing / to the URL in the link.
If you forget the trailing / then your link to www.domain.com/folder will first be redirected to domain.com/folder/ {without www!} before arriving at the required www.domain.com/folder/ page.
The intermediate step, at domain.com/folder/ will kill your listings. Luckily, this effect is very easy to see if you use Xenu LinkSleuth to check your site: it shows up as reporting double the number of pages (when you generate the sitemap) that you actually have, with half of the pages having a title of "301 Moved".
> This is not really a problem. I think it's fine to just ignore it, but a redirect would work perfectly fine as well.
It is a problem, because it will remove your existing search engine listings for subdomain URLs and replace them with subdirectory URLs.
You need to find the code that rewrites your subdomains to subdirectories, and place the non-www domain redirect code ahead of that rewrite code in the same file.
Jim
Regent would definitely want to implement that 301 redirect. Even though Google and the other search engines are supposed to realize (and they usually do) that the domain with the 'www' and without the 'www' is the same, the spiders sometimes get confused and list them as entirely different domains (which they technically are). This causes a duplicate content issue, at worst; and splits up your PR, at the least.
Regent's PR won’t go from a 6 to a 7 if the redirect is done, but it may increase it by a fraction.
301 Redirect at the Domain Level on IIS1. Assuming that www.example.com is already set up as a "website",
go into Internet Services Manager and also set up example.com
(no www) as a website.2. In Internet Services Manager select the new example.com website
and go into Properties.3. Under the Home Directory tab, change the option button
"When connecting to this resource the content should come from"
to "A redirection to a URL".4. Enter the URL as http://www.example.com
5. IMPORTANT:
Check the box "A permanent redirection for this resource." Otherwise
you get a 302 redirect instead of a 301.