How do I redirect my site? non-www to www

A redirect is a simple way to automatically correct a users request to the correct page if you have moved the resource.

To make a redirect for a changed page, you need to add the following into a .htaccess file:

redirect <STATE> / <FULLDOMAIN>/

The <STATE> can be either

  • 301 - Moved Permanently - This and all future requests should be directed to the given URI
  • 307 - Temporary Redirect - In this case, the request should be repeated with another URI; however, future requests should still use the original URI.

So for example, if you wanted to permanently redirect to, you would put an .htaccess file in the web root folder of of your domain with the following:

redirect 301 /smith.html

Use redirect to stop duplicate content on search engines

To prevent search engines being confused about your site, i.e. Is it or, add the following to a .htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule (.*)$1 [R=301,L]

This will cause anyone who uses to be automatically redirected to


  • 0 Users Found This Useful
Was this answer helpful?

Couldn't find what you are looking for?

Related Articles

Why are my FTP transfers timing out following upgrading to Internet Explorer 11?

Some users of Windows 8.1 have found that following an update to Internet Explorer 11,...

The images on my website have been corrupted, what went wrong?

Sometimes this can occur as a result of uploading your images using FTP, most...

Why can I not upload large files with FTP?

FTP uploads are limited to 200MB per file. If you really need to use a larger file than this in...

I am trying to upload a large file onto my webspace, and the file manager inside the Control Panel will not let me. Why?

Because the file manager within the Control Panel is a web based FTP system, it does suffer from...

I can login to FTP via my client, but I cannot see a directory listing of my site files?

If your FTP client appears to log in correctly but no files or directories are listed, it's...