Welcome To Jon Waraas dot Com
301 Redirect
August 15th, 2006 by Jonathan Waraas


Here is a little tip for everyone. I use 301 redirects on all my sites. So if you type in domain.com, it will redirect to www.domain.com. I use it because its better for SEO, so they wont get mixed up on the 2 different versions.

Now, to do this, open up your .htaccess page..

Then put this code in it…

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

Change the “domain” to your sites domain ;)

Good luck.

Follow me on my journey of success and failures, it should be a fun ride.... Again, here is the link for the RSS feed.

Random Posts

Comments are Dofollow! My thanks to you for contributing to the discussion

2 Comments

Comment by Twig
2006-08-16 20:29:00

You should also change “.com” to your site’s TLD. :P

 
Comment by Jonathan Waraas
2006-08-17 00:56:00

Ahh, thanks for catching that :)

 

Sorry, the comment form is closed at this time.