Custom Error Pages

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,088
I read that creating custom error pages are saved in public_html. Let's take a 404 page for instance. How then does it return a 404?

This is important. A lot of people are pleased as punch when they make up their nice 404 page with link backs, but it doesn't return a 404. If it doesn't actually return a 404, then old pages are never be removed in the search engine index because they in fact exist as far as the crawler is concerned. In vDeck for instance there are 2 ways to make a custom 404. One is to actually cut and paste code into the default 404 page, and another is to point to a custom 404 page that can be anywhere on your site. If you do the latter, it will not return a 404 error to the crawler. Not only do your pages with broken links remain in the search engine index, there are also SEO ramifications that I won't go into. One option is to use .htaccess, but that kills Apache performance unless you are using Red Hat Content Accellerator or replacing Apache with something like Lightspeed. This same analogy applies to all of the other error pages.

cPanel does not handle this either. vDeck does, and Plesk MIGHT because they are in a directory at the same level as http_docs where it stores the default pages. If they didn't handle it properly, and .htaccess file could be placed so that there wouldn't be an Apache hit unless there were an error.

What are my options in DirectAdmin?

Thanks!
 
Last edited:
Hello,

I just manually tested this with apache on one of our build systems. Here is the output
Code:
[root@server]# telnet 192.168.0.2 80
Trying 192.168.0.2...
Connected to 192.168.0.2.
Escape character is '^]'.
GET /asdfg HTTP/1.1
Host: testdomain.com

HTTP/1.1 [b]404 Not Found[/b]
Date: Fri, 03 Mar 2006 06:40:01 GMT
Server: Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.6b PHP/4.4.2 mod_perl/1.27 FrontPage/5.0.2.2510
Transfer-Encoding: chunked
Content-Type: text/html

2b
My 404 page.. cant find the file you want.

0
so as you can see in bold, a 404 header is in fact returned with apache, along with my cusotm 404.shtml page.

John
 
so as you can see in bold, a 404 header is in fact returned with apache, along with my cusotm 404.shtml page.
OK, that's what I needed to know. I'm going to give DirectAdmin a try.

Thanks!
 
Back
Top