Tuesday, March 24, 2009

Block all the vistors from one country

I am using PHP, so I just talk someting about Apache. Hope it is something you are searching for.

Due to some reasons, some webmasters may want to block the traffic from one country. It's very easy to do it with the .htaccess file of the Apache. The following is the basic grammar.
order allow,deny
allow from all

# specific IP address
deny from 123.123.123.123
# deny a range: 123.123.0.0 - 123.123.255.255
deny from 123.123.0.0/16
# the whole class: 123.0.0.0 - 123.255.255.255
deny from 123.0.0.0/8
# shorthand for previous
deny from 123

Like the above, just change the IP range to the speific range and add to your .htaccess file. Then you can block a country. The most complex thing is to get the up-to-date IP range of the specific country. I just got a result from Google that who provides the IP range of all countries for free. Please check the following link.

http://www.blockacountry.com/

So, now everything is solved.

If you want to know more about the .htaccess file. Please check .htaccess tips and tricks.

Monday, March 23, 2009

IE 8 vs Google?

An interesting title?

Microsoft lauched IE 8.0 on 20th Mar. 2009. I updated my IE at the earliest time. Have you got yours? If not, check here to download.

I found a very intersting thing. I don't know whether it is the problem of my computer. But I just want to share with you here. When I first open google.com by IE 8.0, the buttons on the google homepage becomes very small. Take a look at the following screen shot.
I tested the new IE in the following days. First I thought it's just the problem of my cache files. But I cleared all the cache files, the problem still occured. Everything is OK with IE 7.0 and Firefox 3.0.7(OS XP SP2). Is it done by MS on purpose or a bug of the new version? I don't know. May be you meet the same problem?

Sunday, December 16, 2007

Free Google Sitemap Generator Software(Based on Windows)


Have you ever tried the sitemap genertor that provided by google? I have tried it today. But I found it was very hard to use. It needs a lot of requirments, just as following:

The Google Sitemap Generator is a Python script that creates a Sitemap for your site using the Sitemap Protocol. This script can create Sitemaps from URL lists, web server directories, or from access logs. In order to use this script:

You must be able to connect to and run scripts on your web server.

Your web server must have Python 2.2 or later installed.

You must know the command that launches Python. (Generally, this is python, but may vary by installation. For instance, if the web server has two versions of Python installed, the earlier version may be invoked by the command python and the later version may be invoked by the command python2.)

You must know the directory path to your site. If your web server hosts one site, this may be a path such as var/www/html. If you have a virtual server that hosts multiple sites, this may be a path such as home/virtual/site1/fst/var/www/html.

You must be able to upload files to your web server (for instance, using FTP).

If you will be generating a list of URLs based on access logs, you must know the encoding used for those logs and the complete path to them.

If you aren't sure about any of this, you can check with your web hosting company.


I don't think all the host company provides such kind of service. So I think I can generate the sitemap on my local computer and then upload to the server. May be you have the same idea with me. I installed the Python on my local computer and run the sitemap_gen.py. It has a lot of configuration to make, I have tried many times to make it correct. But no success results, seems it can not crawl the target site automatically. It always generate only one url(the target url) in the sitemap.xml. What's your experience? Maybe it is not a good tool for some webmasters(just as me).

There are many online free sitemap generators. Most of them are free for sites that have lower than 5,000 links. They are good enough for small websites. But if you have a site that has more than 10,000 links, what will you do? To use their payed service? I don't think this is a good choice for some websites with a little investment.

I searched on google and found a good free software - VIGOS Gsitemap . VIGOS Gsitemap is a 100% FREE, easy-to-use but versatile Windows sitemap generator tool to help webmasters and website owners to create, edit and submit sitemap information in adherence to the Google Sitemaps protocol.

It's a good tool for generating google sitemap. But I suggest the author to improve one thing, when the user clicks the shut button, it should pop up a warning window to let the user to ensure shut down. I have shutted the soft two times by mistake while it was running. All the crawled data were lost every time, I had to start from zero. It took a lot of time. If it has the warning function when shut down, it will be helpful.


Wednesday, December 05, 2007

My experience of optimizing from PR 0 to PR 4.

I am not a professor in SEO, but I have got my own experience in opimizing a site from pr 0 to pr 4. So, I'd like to write something here, hope it will be the open door for the new beginners. I forget to reveal that I am a programmer in PHP, maybe the experience in programming help me a little. But it is not an important factor, I think a little understanding of HTML is enough. But if you have a strong background in website building or programming, it will be more helpful. Ok, let's start.

1. You should understand what your site focus on. What are your target visitors? Choose the best keywords that describe your site accurately. I think this is very important. How dose google or other search engines find your site? They are not so smart as you think. The only thing they can do is text matching. If your site have the word that the visitor is searching, google or other search engines will search in their cached files. If they find a match, then return the match as the search result. So, if you don't have the word that the visistor is searching for, google or other search engines will not find you. Obviously, your site shoule be cached by them first.

How to find a good keyword? I give you two links which I usually use.

a> http://inventory.overture.com/
b> https://adwords.google.com/select/KeywordToolExternal

Just use these two links to search the product or some thing else that your site focus on. You will find the most popular keywords that surfers use and also the search times happen in some months.

2. When you finish the first step, I think you will have a lot of keywords in your hands. Ok, how to put them into your site content? Just write them as comma separated? No, do not do that. You should write soemthing to smoothly include these words. Put this full keywords paragraph in the beginning of your page. Remember the search engine robot reads your page from the top to the bottom, top will be much better than the bottom. But it is not an key factor. Have the keyword is the most important thing.

3. Start building links. You can find some good forums to exchange links with others. I recommend 2 as following which are usually used by myself.

a> http://www.webmaster-talk.com/
b> http://forums.digitalpoint.com/

Do not forget to use signature. It is a good way to give a back link to your site whenever you submit a post. When you start building links for a new site. It is very hard to find a partner to exchange links. Don't worry, keep on posting with signature that links to your site. Your website will be soonly cached by search engines in the following weeks. After that you can tell someone that you'd like to exchange a link with him on your cached pages. They will be much happier to do so.

Although content related links are much better than other links. Some content related website may not want to exchange a link with a NO PR website. I think for a new website you needn't to pursue content related links. Any link(HAVEN'T BEEN PUNISHED BY SEARCH ENGINES) is OK. After you get some PR, start building content related links. Keep on exchanging links, the large quantity of back links you get, the higher PR and higher position your site will gain.

Hope the above 3 will give you some open minds in SEO. They are not new but are my own real experience. I'd like to share with you. Do you have anything to share? Do not hesitate to give a comment. Thanks.