GotChance Coding Services

Finally, i’m free. I’ve finished my school. Now am free to concentrate on my passions like blogging, programming etc… So, as the first step i’d like to announce that i’m open for Coding Jobs… I’m currently offering PSD->XHTML, PSD->Wordpress and PHP Coding services. For more details check out the services page.

I’m a strong believer of the words “Code is Poetry”. I enjoy coding. Hope i get some good tasks soon…

WWW or No WWW in Domain Names

This is something simple that all blogs can do and all blogs should do, but not all blogs do. Do you know that http://www.gotchance.com and http://gotchance.com are treated by search engines as two different websites. So, the search engine results may split up and even worse the Google PageRank will split too. So, it is generally a good practice to do a Search-Engine-Friendly redirect from on to the other.

Here i have chosen to redirect www.gotchance.com to gotchance.com. But that doesn’t make any difference. Here’s how to do it. Just add the following code to your .htaccess file in the root directory of your domain :

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^www.yourdomain.com [nc]
rewriterule ^(.*)$ http://yourdomain.com/$1 [r=301,nc]</code>
If you want to do it otherwise (i.e) from Non-WWW to WWW, here's the code :
<code>Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourdomain.com [nc]
rewriterule ^(.*)$ http://www.yourdomain.com/$1 [r=301,nc]

Now, go ahead and start concentrating your SE Optimization on one domain.

UPDATE : When i checked the FeedBurner stats (while making this post), i noticed something that is very much related to this post. Here is a screenshot. I use gotchance.com/feed for my FeedBurner feed and www.gotchance.com shows as one of the top referrers. This is before i started redirecting www to non-www :

Referrer

5 Must Have Pages on a Website

A 404 Not Found page on Technorati reads as “Sorry! We have a zillion pages, but not that one”. Thats nice text for a not found page. But, your users wouldn’t like to see it when trying to access few important pages. What are those pages ? Lets see…

1) Contact Me

The contact page is the most important page of any blog. I do have a Contact page here and all bloggers who are serious about blogging have one. It not only helps your readers interact with you, but they also let you know of any errors that might pop up on your site. You don’t have one & don’t know how to make one ? Never worry. Kontactr is a service that i created, to make contact forms easier. It takes less than 30 seconds to setup your contact form (that depends on your Internet speed though :-P).

2) About Me

This is something that would make your blog more personal. It is also a part of personal branding. When they users get to know about you, they become more loyal to you. Take a look at some about me pages. I know that i don’t have an About Me page here. The reason is that i’m not able to come up with a good one. I will try to put one soon.

3) Advertise Page

If you seriously want to make money online, an Advertise page is a must. I don’t have one as my blog is new and doesn’t have Pagerank yet. I’m expecting PR4 in this update and if it hits, i’ll put up one. Check out John’s or Nate’s advertise pages to know what should be put up in an Advertise page. I do have an Advertise page on my other free webmaster resources website. Does it meet John’s and Nate’s quality ?

4) Search Page

The search feature comes packed with WordPress. But, if you have a Non-blog website, you should really consider getting your own Search facility. I get irritated when i see websites without a search box. You might give Google Co-op a try. Thats works very well.

5) Sitemap

A sitemap is helpful not only for Search engine robots, but, also for human visitors. It helps them find what pages are where. There are lots of sites (even a wordpress plugin) that help you create a sitemap for a robot. But, you should manually gather the links and organize them properly to make a sitemap for humans. Check out these sitemaps of some giants : Google, eBay, Apple.

Simple way to Track Downloads

A simple google search of “download tracker” yields 92,900,000 results. There are also a lot of nice download tracking script that i know. They all come in useful when you have a lot of files for download and you have your own download repository of large number of files, like on my other Free Webmaster Resources website (though i use a custom coded one there). But on this blog, i just have some 2-3 themes and 1 plugin for download as of now. So, a download tracker would simple be unnecessary. But, i would like to track how many times my file have been downloaded. I use a simple method here on my blog.

I have a PHP file with the following code :

<?php
$hits = file_get_contents("SOME-NAME.txt");
$hits = $hits + 1;
$handle = fopen("SOME-NAME.txt", "w");
fwrite($handle, $hits);
fclose($handle);
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=LINK-TO-ORIGINAL-ZIP-FILE" />';
?>

The SOME-NAME.txt is the text file to which the number of downloads is written. It needs to be CHMODed to 777. And initially, it should contain “0″ as the file content. The LINK-TO-ORIGINAL-ZIP-FILE is the link to the file that needs to be downloaded. It can be any type, not necessarily be a Zip file.

I currently use this method for all my downloads on this blog. For eg, Got Banners can be downloaded from Here. The tracking is done on this TEXT File. Now, i hope that helped some of you.

Which kind of URLs are the best ?

Many times people get confused between what URLs are Search-Engine-Friendly(SEF) and what aren’t. The complex URL involving a lot of query strings etc.. appear mostly in user-generated-content scripts like Blogs and Forums. Take a look at the following URLs :

  • WordPress : http://www.yourwordpress.org/?p=176
  • vBulletin : http://www.yourvbulletin.com/showthread.php?t=42918
  • IPB : http://www.youripb.com/index.php?showtopic=236497
  • SMF : http://www.yoursmf.com/index.php?topic=189291.0

Of course, these are very complex and looks pretty ugly. Further many of the URLs used in forums contain a lot of other query strings also like Session IDs, Post IDs in addition to Topic IDs etc… These kind of URLs are disliked by Search Engines. This gave rise to the SEF URLs.

With suitable plugins or settings, you can convert the above URLs as something like below :

  • WordPress : http://www.yourwordpress.org/p/176.html
  • vBulletin : http://www.yourvbulletin.com/t42918.html
  • IPB : http://www.youripb.com/topic/236497.html
  • SMF : http://www.yoursmf.com/topic/189291.0.html

Thats it. These are better and are Search-Engine-Friendly URLs. But, are they easy to remember ? Would you be remembering Post IDs for the URLs. Of course, not. So, we need to modify these further to make them Human-Friendly as well.

So, you have to convert it into something like below :

  • WordPress: http://gotchance.com/2007/08/17/4-reasons-to-avoid-paid-reviews/
  • vBulletin : http://www.yourvbulletin.com/your-topic-title/42918.html
  • IPB : http://www.youripb.com/your-topic-title/236497.html
  • SMF : http://www.yoursmf.com/your-topic-title/189291.0.html

Those are sexy and this kind of URLs are being used by most Blogs and Forums. Thats a very nice practice. WordPress has it as an inbuilt feature. vBulletin has a plugin called vB SEO to do this. IPB has IPB Seo. SMF doesn’t have anything as advanced as vB SEO, but SEO 4 SMF pretty much serves the purpose.

If you don’t use any of these ready-made scripts, you can customize your URLs using .htaccess. We’ll see about it in the next post.