301 Redirect

301 Redirect

The Problem

The Solution

Follow these steps to create a 301 Redirect:
  1. FTP to the server
  2. Find the .htaccess file (usually in the web or www folder)
  3. Edit the .htaccess file
  4. Look for # Various rewrite rules
  5. 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:
  6. # 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]
  7. 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.

Related Posts

Drupal URL Redirect after Node Creation

Chris Sloan
Read more

Don't sync Drupal files to local environments. Redirect them Instead.

Mark Carver
Read more

Redirect all requests to a canonical domain

Dustin Currie
Read more

How to Set Up PPC Conversion Tracking in Drupal

Colin
Read more

Don't Lose Your Assets In a Redesign (part 2)

Tom McCracken
Read more

Don’t Forget About Foundational SEO

Felipa Villegas
Read more