• Home
  • Share and earn
  • Knowledge base
  • Contact us
  • Login
  • Sign Up
non-www to www
  1. knowledge base
  2. shared hosting
  3. non-www to www

Many customers at some point request to force either the www or non-www version of their site to display in their visitor's browser. For example, you can have www.example.com or simply example.com display in an address bar.

There is a common thought that forcing one format is better for search engine optimization.

To force non-www to www version of your web site:

step 1: Edit your .htaccess file using your favourite ftp client.

step 2: Put the following content


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

Are you ready?
create an account for free.
Create Your Account

Contact us

info@hostdrop.eu
Lasnamäe linnaosa,
Sepapaja tn 6,
15551 Tallinn, Estonia

Hostdrop

  • Create a ticket
  • Share and earn
  • Knowledge base

User

  • Login
  • Sign Up