Archive for the ‘Website Hosting’ Category

Dubious Business Update

Friday, April 16th, 2010
Domain Registry of America Scam Invoice

Scam Invoice sent by Domain Registry of America

By now, I’m sure most of you have heard about or seen a letter from “Domain Registry of America” (Wikipedia). They’re the ones who send you a letter in the mail saying your domain is about to expire (and seem to have a loose definition of ‘about’) and that you should just pay them 2-3x what you normally pay to renew a domain and renew it with them.

Oh, and it looks like an invoice (look on the side).

Oh, and it seems like you must have done business with them before, since they have all of your general information because you’re required to list it in the whois record or they (your registrar) can remove your domain.

Anyway, now that you know who I’m talking about, I wanted to pass along a bit of information from Mark Karpeles, which is that these guys seem to now be also operating under the name “Domain Renewal Group”, at least outside of the US, but possibly within as well.

Disclaimer: I haven’t done personal research to be sure the scum sucking dirt bag company that is Domain Renewal Group is the same scum sucking dirt bag company that is Domain Registry of America, but Mark’s evidence shows that even if they’re not one and the same, they do seem to be scooped out of the same steaming pile.

  • Facebook
  • Digg
  • Twitter
  • StumbleUpon
  • Reddit
  • Share/Bookmark

Custom error pages are icing on the cake

Sunday, May 17th, 2009

Many people go through tons of trouble organizing their site, building their brand, tweaking their online presence… you get the idea. So, if you’re bound and determined to make sure that your entire website is as “together” as possible, why then do so many people forget about custom error pages?

What are custom error pages?

Custom error pages allow you to show a fully branded page in the event of an error occuring on the website. There are five primary errors that are typically handled with custom error pages:

  1. 400 – Bad Request
  2. 401 – Authorization Required
  3. 403 – Forbidden
  4. 404 – Not Found
  5. 500 – Internal Server Error

Now that we know the names of the common error codes, let’s get a little more detail about each. After all, knowledge is power. For reference, I will also link you to W3’s HTTP/1.1 Specification which one could say is the definitive source.

400 – Bad Request

From: W3 HTTP/1.1 Spec

The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

This is essentially a programming 404 (missing/unusable page). Think of it something close to “Either there is an error in the website, in the link you used, or in the application that powers the site.”

401 – Authorization Required

What this code means, is this area is protected by a username/password combination. Webservers are designed to use this status code both on the initial request for authentication, and when authentication fails. Most browsers will try credentials three times before they display an error page.

403 – Forbidden

A 403 error code means that the webserver processed the URL correctly, but for one reason or another, is refusing to display the page. A real life example of receiving a 403 error is when Mod Security blocks a URL that contains potentially harmeful code in it.

404 – Not Found

This has to be, hands down, the most common error code ever seen. It has even made it’s way onto T-shirts! So if there is one page out of all of these you would want to spruce up, this would be it. Google also has a handy widget for your 404 page which can help direct people to where they are meant to go. To get to it, go to your Google Webmaster Tools Dashboard and click on the domain you are working on. From there, go to Tools (on the left), then to Enhance 404 pages. I outline the directions as direct links are not possible, and it took me a minute to find myself.

500 – Internal Server Error

There are a number of issues that can cause the “Internal Server Error” message to be displayed. Bad .htaccess directives, bad file/directory permissions, or even the program completely erroring out.

Enough! How do I make a custom error page?!

Now that we know what is behind them, we have enough knowledge to impart some meaningful errors in our custom pages.

Here are the steps I recommend to create custom error pages with Apache:

  1. Create a folder named ‘error_pages’ under your ‘public_html’ or ‘www’ folder. If you can access it by http://www.example.com/error_pages/ then you’ve set it up right.
  2. In here, we create 5 files, let’s leave them blank for now:
    1. 400.html
    2. 401.html
    3. 403.html
    4. 404.html
    5. 500.html
  3. You’ll want to add HTML to each file to present a display. I will cover this below.
  4. To finish it up, we add the following to your .htaccess file in ‘public_html’ or ‘www’:
    ErrorDocument 400 /error_pages/400.html
    ErrorDocument 401 /error_pages/401.html
    ErrorDocument 403 /error_pages/403.html
    ErrorDocument 404 /error_pages/404.html
    ErrorDocument 500 /error_pages/500.html

Now for the content of the files. For the purpose of this example, I will leave these very simple. You will want to modify them with your design/layout code to ensure they match the design of your site. If your site uses templates, you can also the file extension .php instead of .html and they will be processed by php before being displayed.

The basic design

So now we’re ready for the page itself. I’m just going to show one example, but feel free to use it for the base of the others.

<html>
 <head>
  <title>Error 400 - Bad Request</title>
 </head>
 <body>
  <p>Something in your request didn't agree with our webserver. Please go back
  and try again.</p>
 </body>
</html>

So there you have it, the basics of how to set up custom error pages. Don’t forget to include your custom 404 widget on your 404 error page, to help people navigate to a page that will help, as opposed to leaving them at a dead end.

It’s nothing life changing, it’s not radical, it’s just one of those steps that you take to help ensure a cohesive website browsing experience, even when things go wrong.

  • Facebook
  • Digg
  • Twitter
  • StumbleUpon
  • Reddit
  • Share/Bookmark

Do you use IMAP email? Let the server do your filtering!

Wednesday, May 13th, 2009

Lots of people use IMAP instead of POP3 for their email access, but not so many people pick up on advantages that can be had by making that choice. We’re going to take a quick look today at one of the best reasons for using IMAP access to your email inbox.

Because this is the Internet, we’re allowed to use made up statistics. My made up statistic for this article will be that 99.99% of people who use IMAP to access their email have at least one filter, and if they’re not, perhaps they just haven’t realized the usefulness of it.

The great benefit of IMAP is that all email is left on the server. So no matter if you check it from home, work, or your friend’s house (via webmail!), you have access to every piece of email as if you were sitting at your usual computer.

The only problem with this method, especially my problem with this method originally, was it meant if I didn’t leave my email program open at home, then my emails would never be filtered, and they’d be one giant mess in my inbox when accessing from other locations.

So today, we’re going to talk about filtering with Exim Filters.

How Do I Make An Exim Filter?

First you will need to know, and probably write down, two things:

  1. The path to your email inbox on the server.
  2. The path to your exim filter file.

For the path to your email inbox on a cPanel server, it will look like:

mail/EXAMPLE.COM/EMAIL_NAME/

The path to your exim filter will be:

etc/EXAMPLE.COM/EMAIL_NAME/filter

So for example, say your email address is ‘bob@example.com’, your two paths will be:

Email Inbox: mail/example.com/bob/

Exim Filter: etc/example.com/bob/filter

Now that we have the paths out of the way, let’s continue.

Exim Filter usage started out here as a custom modification we had made to cPanel, though eventually they integrated it into their base configuration, which is excellent news for everyone. Now we just need to teach people how to use them.

To start using an Exim Filter on your incoming email, you will need to log into FTP, or go to your file manager in cPanel. From your home directory, the directory structure is ‘etc/example.com/email-account-name’. For me, that’s etc/webonce.com/jmather, however for you it will be different.

Once you have the last directory made, you need to create a file named ‘filter’. This is the file that Exim will check for to find filter rules. Not only that, but it needs a special ‘header’ (the first few lines of the file) just to make sure that you’re trying to filter email and didn’t place the file there randomly. The begining of an exim filter file looks like:

# Exim filter
# Error trapping
if error_message then finish endif

The first line tells Exim “Yes, okay, use this as a filter.” The second is just a comment for your information, and the third basically tells exim “If there’s a problem, then just stop.” So problems don’t cause too much of an issue.

Now for your first rule. My favorite rule automatically puts emails that SpamAssassin has marked as spam, into the trash.

# SPAM CHECK
if $header_x-spam-flag is "YES"
then
    save mail/webonce.com/jmather/.Trash/
    finish
endif

This tells exim if the header ($header_) X-Spam-Flag (x-spam-flag) is YES, then to save it to the folder named Trash (with cPanel’s IMAP setup, folders under your inbox are prefixed with a .).

Now say your friend Billy emails you a lot. So much, in fact, that you want to give him his own email folder. Billy’s email address is billy@example.com. Here is the rule you would use:

if $header_from contains "billy@example.com"
then
    save mail/webonce.com/jmather/.Billy/
    finish
endif

we use $header_from as we’re working with the “From:” header in the email. You will notice I used ‘contains’ instead of ‘is’. The reason I did that is because Billy sets up his email with his name in it as well, so the From: header actually looks like:

From: Billy Boy <billy@example.com>

We could match the whole thing, but this gives us flexibility to only specify the email address.

So there’s the basics of how to use Exim Filters to filter your email on the server. If this topic proves of some interest, I will go into further ways you can use Exim Filters to make things simple for you, and also cover some of the cavets of using this method, like tweaks you will want to do to your configuration of Thunderbird.

  • Facebook
  • Digg
  • Twitter
  • StumbleUpon
  • Reddit
  • Share/Bookmark