The Problem
The Solution
Follow these steps to create a 301 Redirect:
- FTP to the server
- Find the .htaccess file (usually in the web or www folder)
- Edit the .htaccess file
- Look for # Various rewrite rules
- To redirect all users to access the site WITHOUT the 'www.' prefix, (http://www.example.com/... will be redirected to http://example.com/...) uncomment (remove the #) and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
So if I wanted to redirect level10design.com to LevelTenDesign.com, it would look like this:
RewriteCond %{HTTP_HOST} ^www\.level10design\.com$ [NC]
RewriteRule ^(.*)$ http://www.leveltendesign.com/$1 [L,R=301]
- Save and upload the .htaccess file to the server.
Add a new set of rules for each domain you want to redirect to that site.