Archive for the ‘HostingTips’ Category

Whitelisting an IP for MySQL in CPanel

Thursday, April 19th, 2007

I guess this allows an IP to connect through your web host´s firewall.

In CPanel go to

Update Billing Info >

Update Now >

Customer Preferences >

MySQL Whitelisted IPs

Enter the IP

Done :-)

Lunarpages goes the extra mile

Tuesday, April 17th, 2007

Companies often think of extra ways of assisting their customers and offering services that are useful to them in order to excel. Lunarpages‘ core competence is the running of a successful web hosting business and one of the biggest threats to them and their customers are hacking attack. Popular Php scripts are one of the biggest liabilities in a shared hosting environment as they frequently have many security holes and phpbb for instance is notorious for vulnerabilities.

The only time I ever got hacked in 5 years was through a phpbb security loophole of the standard installation! Lunarpages frequently scans the most popular free scripts for security leaks and warns it´s customers and points them to the necessary updates. The policy of disabling sites who don´t execute the necessary update may seem a bit rigid at first but it ensures the smooth running and safety of all servers at Lunarpages.

Read my Lunarpages review for more details on this host.

Making a custom 404 error page

Monday, April 16th, 2007

404 Page not Found errors will not only annoy your visitors but if you have too many they can also hurt your rankings in the search engines. With AWStats you can see where a 404 error occurs and eliminate it. If you build a custom 404 error page you can inform visitors that they page that they wanted to access doesn´t exist and give them an opportunity to return to the home page.

You need access to the .htaccess file:

In there put this line: ErrorDocument 404 /error.html

You can give this any name you like but really 404.html, notfound.html, error.html would make most sense to indicate through the url what this page is about.

Next create your error.html page with a link, your logo etc. just be creative and you will have a good chance of keeping some of those visitors on your site. If you have a search box you could include that as well and maybe a link to your sitemap. There are usually two philosophies to designing a custom 404 page. One option would be to keep the usual design and just put a 404 message in the middle column for instance. Another would be to have a different page style where you just keep your logo, a centered error message and a link back to the homepage.

Make sure that all links that you use are absolute. I.e. use something like http://www.yoursite.com/articles/index.html instead of just /articles/index.html . As your 404s may sometimes be caused from within the CGI bin or other locations relative urls spell trouble. And you don´t want to provoke 404s from within your 404 page, now do you ;-) ?

All you need to do now is to upload your .htaccess file and your error.html .

The following affordable web hosts provide a .htaccess file which you will need to setup your custom 404 error page:

Bluehost – read about bluehost´s recent upgrade
Hostgator
HostIcan
Hostmonster
-read my post “bluehost hostmonster same company” they also upgraded their plan
IPowerweb
Lunarpages
Powweb
Startlogic

More detailed reviews can be found in my cheap web hosting review articles.

Redirect to www with .htaccess

Saturday, April 14th, 2007

The prefix www in web hyperlinks is becoming obsolete but a lot of people still like using it. So in order to avoid a 404 when someone tries to type in a http://yourhomepage.com you will need to setup a redirection to http://www.yourhomepage.com in your .htaccess file. This is the code you will need to enter:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourhomepage.com [nc]
rewriterule ^(.*)$ http://www.yourhomepage.com/$1 [r=301,nc]

This also ensures that you don´t lose page rank through links pointing to http://yourhomepage.com instead of http://www.yourhomepage.com

Excluding an IP in Awstats

Thursday, April 12th, 2007

I can verify that this works for both Bluehost and Hostgator. Excluding your own IP is a necessary step if you don´t want to distort your statistics. Moreover if you use wordpress I found that the different post and admin urls can seriously clutter the AWStats visited pages section which is one of the most important ones in my opinion.

To exclude your url in AWStats locate /tmp/awstats/ and edit the awstats.yoursite.com.conf . In the SkipHosts=”" parameter enter the hosts’ IPs you want to exclude. Finally, chmod 444 awstats.yoursite.com.conf . In Filezilla you can chmod files by right clicking them and going to the file permissions menu. If you´re in doubt you can also chmod your files from within the CPanel files menu.

If you have a dynamic IP you can also use regular expressions to exclude your IP in the SkipHosts=”" parameter. To do this you would have to exclude the first three octets of your IP like this SkipHosts=”REGEX[^123\.123\.123\.]”

This method works at Bluehost and Hostgator and should be very similar at other CPanel hosts that utilize AWstats.

Adult Hosting

Wednesday, April 11th, 2007

If you are looking for adult web hosting there are three good affordable web hosts who permit this content. I became aware of this while browsing various knowledge bases for other stuff. HostICan, Lunarpages, and Hostgator are among the best affordable web hosts in the business and if you want more detailed info about their plans please go to my main webhosting review site.

Hostican states that you can host anything as long as it complies with US law. You may be asked to upgrade to a dedicated server if your site uses huge bandwidth or processor capacity. I have a more detailed analysis of this host’s features in my HostICan review.

Lunarpages is another cheap web hosting firm which has no problem with hosting adult content. On their site they state:

“Yes, we do allow adult sites to be hosted here. Lunarpages has no restrictions upon content of your website as long as it is legal as defined by California law.However, adult sites that require extreme amounts of server resources and bandwidth will not be accepted.

Please thoroughly read our “Terms of Service”, http://www.lunarpages.com

We allow all kinds of adult sites except, free tgp (thumbnail gallery posts), circular pop up sites and free image galleries. Other than that, feel free to be as adult as you can be under the law of California.”

For more info on Lunarpages please read my Lunarpages hosting review.

Update: Thanks to a post in the Hostgator forum I became aware that they offer adult web hosting as well. Check their knowledge base and T&C for specifics. Make sure you go to my main site and read my Hostgator review.

AWStats – Introduction and hosting

Tuesday, April 3rd, 2007

AWstats is one of the most advanced free web statistics scripts available. It is available for download but instead of downloading and installing it I would recommend to find a web hosting firm that offers AWstats pre-installed. It’s a Perl script after all and installation can be a bit fiddly for the inexperienced user.

The following hosting firms have AWStats pre-installed: Bluehost, Hostgator, Hostmonster, HostICan, Lunarpages, Powweb.

If you host more than one domain on an account you can switch AWStats on for every domain through the Stats Manager in CPanel. For those who want to take a shot at installing AWStats on their local server or web server there are a few good links here.

For the rest of you who are still reading, I will introduce you to the main features and the AWStats output.

Summary: The summary field summarizes the number of unique visitors, the ratio of unique visitors/number of visits, the total pages viewed, the pages/visitors ratio and bandwidth used. AwStats also distinguishes between your human traffic and non-human traffic. The number of unique visitors is the main indicator for the traffic of a website. From the ratio which compares unique visitors to total visits you can see whether or not visitors are returning. Everything above one is good and means your site manages to encourage visitors to revisit your site. Getting close to two is the holy grail. The pages to visitor ratio is a good indicator as to what extent your visitor browsed your site. Obviously, if a visitor browses an average of 10 pages per visit your site is more interesting to your visitors than one which only gets 1.5 pages per visitor.

Monthly History: This section provides a monthly overview of unique visitors, number of visits, pages, hits, and bandwidth. In the bottom row you can also see the totals for the year. The ratios are not provided but can be easily computed.

Days of month: Gives you a breakdown of the aforementioned statistics by day of the month. Usually, I don’t find this very insightful. Only extreme daily changes will show up and can be explained. If you get a high traffic link, your server goes down etc.

Days of week: This section provides an overview of the average activity on each week day. The results may be slightly distorted as not every month is divisible by 7 and most of the time some days may occur more often than others. The activity can be useful for you to see when to announce a new feature (highest activity) or to schedule maintenance (during lower activity/server load).

Hours: Provides an overview of the average activity during the hours of the day. Again this is useful for technical staff for scheduling jobs on your site. Days of week and hours are both important to monitor the success of your marketing activities.

Countries: Shows you what countries your visitors are from. Be weary of visitors that don’t visit very often but use excessive bandwidth, and view a lot of pages. Those “visitors” may actually be malicious bots that steal content or perform other unwanted activities.

Hosts: A breakdown of your most frequent visitors by I.P. address. If you find something suspicious you can do an I.P. lookup which won’t be necessarily insightful but you can at least find out where their ISP is located.

Robots/Spiders visitors (Top 25): Spiders that visit your websites will show up here. The traffic is counted by hits (before the plus) and successful hits on robots.txt (after the “+” sign).

Visits duration: How long are you visitors staying on your site? The longer the better.

Files type: What files types where requested most? Could urge you to use smaller file if you’re using too much bandwidth. It may also indicate if someone is hot linking to your site.

Pages-URL (Top 25): Which ones of your pages are most frequently visited. The top rank is usually occupied by your home page. This section also provides the number of entries or exits of a particular page. If you have a high number of exits as a percentage of entries than the page in question is not doing a very good job at retaining your visitors and may need some extra attention.

Operating Systems (Top 10): A detailed analysis of the different operating systems used by your visitors. This can be used in conjunction with the browser report in order to optimize your site design.

Browsers: A list of the browsers used by visitors to access your site.

Connect to site from: This is one of my favourite reports within AwStats. First you can see what percentage of your visitors accessed your site through direct type in or bookmark. You can also see whether you have incoming links from search engines and other websites. The columns show you the hits and pages generated by these incoming links and what their percentage is based of the total of hits and pages.

Search Keyphrases and Keywords: The keyphrase would be a google search for “Cuban cigars” and the keywords are “Cuban” and “cigars”. This is a very helpful feature to assess how well you rank for certain keywords in the search engines. Compare this to the “links from search engines” to get an idea which search engines are providing your traffic.

Miscellaneous: Monitors whether your user’s browsers support certain media types. Although this is useful my columns always stay empty even though I’m pretty sure that a lot of my visitors have .pdf enabled for instance. So either my AwStats is not properly configured with regards to this section or something else is wrong here. Another very useful metric to gauge your site’s appeal to your visitors is the “Add to favourites estimated” which measures how many visitors out of the total bookmarked your site. This is a key retention indicator as this will most likely bring in repeat visits and help you build a solid and steadily growing traffic base.

HTTP Error codes: Here you can check what errors are occurring on your server and start to fix them. 404s are listed by URL so you can easily achieve zero 404s from your indexed or internal links. If someone performs false type ins then that’s beyond you of course. I also like to monitor if all of my 301 permanent redirects are working. For particular 301s you would use a redirection check tool but it’s nice to get a feeling for how often these redirects are taking place on your site.

By now you will have probably realised that Awstats is one of the best free stats tools available. If you go through the hassle of plugging some of the data into an excel sheet you can produce some really insightful graphs and get a really detailed understanding of what is taking place on your site and in your linking neighbourhood.

If you liked this post, here´s the link:
AwStats hosting