Top10WebHosting

Open NavigationOpen Search
Everything related to web hosting.
  • Learning center
    • Move host guide
    • Compare Shared Hosting & VPS
    • SEO related
  • Hosting by features
    • Top web hosting
    • cPanel web hosting
    • PayPal web hostings
    • PHP Web Hosting
    • VPS Web Hosting
  • Coupons
    • Bluehost coupon 2017
  • Hosts overview
    • GreenGeeks Review
    • JustHost Overview.
    • Bluehost Overview
    • IXWebhosting Overview
    • Hostmonster Overview
    • Hostgator Overview.
    • SiteGround Overview
  • About
    • Contact Us
    • Disclosure
You are here: Home / apache / Force your visitors to visit WWW of your website.

Force your visitors to visit WWW of your website.

November 19, 2007 by Wyng

Google can sometimes think “www and without www” are 2 duplicate websites and it could harm your seach engine result position (SERP)! It is better to force your visitor (including google bot) to view only 1 version of your website.

You can easily redirect all non-www traffic to www version of your domain, along with links to homepage or sub-folder. e.g. redirect yourdomain.com/aboutus.htm to www.yourdomain.com/aboutus.htm

Append code below to your .htaccess file, replace yourdomain.com with your own domain name.

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

Code above works with any Apache webserver with RewriteEngine.

Anyone knows what is the solution for IIS ?

Filed Under: apache, domain name, seo, tips, tutorial

Back to top ▴

List of Most popular hosting plan


Our list of top web hosting plan with discounted entry price, good features with excellent support.

Hosts using the Most user friendly control panel


cPanel control panel has the most user friendly interface to control the Linux enviroment.

Hosts accepting PayPal


Stay safe, use Paypal to hide your credit cards from hosts.

Follow us on Social media

About Top10WebHosting.com

I manage & consult web developments for companies. And I have chance to use different web hosts by different client.

I am here to share some good & highlights of different hosts by features & rating.

Search this website

Copyright © Top10WebHosting.com 2002-2018. All Rights Reserved.