301ing with the .htaccess file


It's a good idea to have 1 main site location. Whether it is http://www.seocactus.com/ or http://seocactus.com/, when launching your site you should choose one and stick to it. You don't want the search engines thinking you have duplicate content.

If you're using an apache server then you're in luck! Here is some code for your .htaccess file that you can use to permanently redirect your site. For example: http://seocactus.com/ to http://www.seocactus.com/

If you want your site to be only accessible with www...

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^seocactus\.com$
RewriteRule ^.*$ http://www.seocactus.com%{REQUEST_URI} [R=permanent,L]

Since the .htaccess file is a hidden file you may have some trouble uploading it. If you do in fact have trouble uploading it, you can call it "htaccess" when uploading it and then rename it to ".htaccess" when it is on your server.

With IIS, you can create a new website with the GUI and permanently redirect your site with a couple of clicks.


User login

Who's online

There are currently 0 users and 0 guests online.

Latest Articles

Powered by Drupal - Design by Artinet - © 2007 SEO Cactus