donalyza.com

Avatar

Hello! I'm Donalyza Agaton, a Blogger who loves Web Design, a rock and r&b Audiophile, a psp Gamer, a hobbyist Photographer, an amateur Videomaker, a gadget geek Girl, and a proud Filipino.

donalyza: is integrating my Twitter acct with Facebook. 2 days ago

How to: Several ways in Forcing www or no-www in domain

Posted in: WordPress

This is one of the first thing you need to do after buying a domain. Why do we need to this? If you are thinking about search engine optimization definitely this is important. For instance, donalyza.com redirects to www.donalyza.com. The main purpose of redirecting your domain to your preferred URL is to let Google crawled as one website. The sites that link to donalyza.com will add to the page rank of www.donalyza.com. Basically this only means that it will double your page rank score. Another factor is to avoid duplicate content in search engines.

3 Ways to Force www or no-www (in spirit of no-www.org)

1. Redirects in Cpanel 11

Login to your cPanel account and look for Domains section and click Redirects. Edit the form using your selected URL. Click the image for better viewing.

  • Force www

    force www in cpanel

  • Force no-www

    no-www in cpanel

2. Edit your .htaccess

- to edit your .htaccess, go to your ftp server and download the file. Most of the time it’s in your public_html folder. If you can’t find it create your own .htaccess provided that you enable to view your hidden files. Choose your preferred url and type the code.

  • Force www

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

  • Force no-www

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

3. Use of WordPress Plugin

- there are times that you don’t use cPanel nor can’t edit your .htaccess. If you are using WordPress platform, make use of this plugins to simply do this stuff for you.

Don't miss any post. Subscribe to RSS or by email now.

Comments

RSS feed | Trackback URI

2 Comments »

Wednesday, January 23, 2008 at 10:21 am

if you are using Wordpress 2.3 and above versions, these things are taken care of automatically. no need to install any plugins, or you might end up with infinite redirects. read more about it here.

 
Wednesday, January 23, 2008 at 10:52 am

@marhgil: Thanks for the tip!

 
Your Ad Here

Trackback responses to this post

Leave a Comment, Win a Friend!

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
blog stats ss_blog_claim=26b83e33748acc79fc695f757f72db87