Welcome to Your Digital Path to Success

Setting Up Your 301 Permanent Redirect

08 Jul
2009

By preparing your website with a 301 permanent redirect, you are not only helping the search engines keep your website organized, but you are also helping them give you more value. The thing is, if you don’t have a 301 permanent redirect setup, your domain.com could be looked at differently than your www.domain.com. This could be detrimental to your positions in the SERP or even more.

We say “even more” because there was a prospect we did a free analysis for. We discovered that when you go to their domain.com site, it was fine, but if someone typed in www.domain.com, the page was literally non-existent. This can really hurt you through the search engines and through customers who ended up on the wrong domain.

To prevent this from happening, you can use a .htaccess file that would tell the browser what to do when they land on either domain.com or www.domain.com.

We prefer to send www.domain.com to domain.com using a .htacess file. If you’re not sure how to make that file, just create a new text file and rename it to “.htaccess”. Make sure you’re also able to edit the extension. If you have trouble with it, you can usually do it through your hosting cpanel via file manager.

If you have a WP blog, these are the codes you’d use in that file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{http_host} ^www.domain.com [nc]
RewriteRule ^(.*)$ http://domain.com/$1 [r=301,nc]
</IfModule>

Just replace “domain” with your domain name.

Here’s how you do it if it’s just a regular page (not a blog):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Hope this helps.


This article was written by Dallas’ rankaboveothers.com – Texas SEO is a Dallas-based web marketing and consulting company. We can help you improve your on-site and off-site optimization so that your website not only looks good to visitors but rank well for the keywords you need. Let us increase your business by first giving you a free analysis.

Kevin Lam
author

Kevin Lam is a self-taught internet marketer, web developer and traffic conversion expert that started since he was 17 in 2000. Even throughout his 5 years in the Navy, Kevin continued to hone his skills. Kevin now owns multiple digital companies including a Strategic, Digital Marketing Firm, a Sales Funnel Concierge Service, General Support Company and other digital products.

4 Comments

  1. Stop Motion | July 9, 2009 at 4:29 am

    Hi,

    Good post i really like it !! this is one of the most important thing for SEO as i m not seo expert i am searching for something similar to this so long ago but now i find it.!!1 keep it up this good work..

  2. Sales Engineer | July 11, 2009 at 5:48 pm

    I hadn’t thought of redirecting domain.com to http://www.domain.com , I’m going to set that up right now, thanks.

  3. Robert | July 12, 2009 at 6:48 pm

    Great Post about the difference in domain names.By default WordPress leave off the www unless you take steps to insure that it is added.

    Being Lazy, after Copying and pasting it (your .htaccess file) to Notepad, I fired up FF and went to my Cpanel where I opened .htaccess then I copied and pasted the two new lines, saved my changes and closed out my browser. Note: Had the Notepad file open side by side with my public_html/.htaccess so i knew where and when to insert the two new files.

  4. Kevin Lam | July 12, 2009 at 7:37 pm

    Glad you guys are finding this helpful. Let me know if there’s anything else you might be interested in.

Leave a reply

Your email address will not be published. Required fields are marked *