I am a bit confused about a site I am working on, everything except the homepage is seems to have the www. in front on it but the homepage seems to default to just http://domain.com I submitted my sitemap to google etc and there are lots of errors because my homepage doesnt match my internal page URLs. I have a number of links that point to http://domain.com and don't want to lose them. The site is bodycleansediet.com Is there a way to redirect http://bodycleansediet.com to http://www.bodycleansediet.com and would this have any implications for ranking? How do I setup my site to default to www.? I've also noticed this URL appearing in some results - http://www.bodycleansediet.com/index.php your help is MUCH appreciated! thanks alot
Create a .htaccess file in the /public_html/ directory. If the domain is an add-on domain, then create the .htaccess file in add-on domain's directory. Put below code in the .htaccess file Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^bodycleansediet.com [NC] RewriteRule ^(.*)$ http://www.bodycleansediet.com/$1 [L,R=301] Code (markup):
Thanks for this, I already have a .ht access file - so should I just add this to it? My current .ht access file is below - should it go before or after? redirect 301 /isogenix.htm /pages/isogenix.php redirect 301 /isagenix-reviews/index.html /pages/isagenix-reviews.php redirect 301 /drfloras/dr-floras.html /pages/dr-floras-colon-cleanse.php redirect 301 /isogenics.htm /pages/isogenics.php redirect 301 /isagenix-abc-news-review-videos.html /pages/isagenix-on-abc-news.php redirect 301 /isagenix-reviews/isagenix_products_reviewed.php /pages/isagenics-products-review.php Code (markup):
Once quick question how would I add http://www.bodycleansediet.com/index.php to this list? Thanks again