404 pages on 1&1 webhosting: complaint and solution

I had an unpleasant surprise today when I was testing a new site I’m setting up using 1&1 web hosting… I mistyped the URL, and lo and behold, instead of showing any kind of useful error page for the 404, the server neatly redirected my browser to a completely different URL, “domparking.php” at the “sedoparking.com” domain. [I'm carefully not linking, and don't visit the page; I'm sure they get advertising revenue from it.]

I’ve seen default 404 pages where the host sneaks in a few of their own ads, and that’s kind of annoying. But there’s still a message in there somewhere that tells the person they hit a bad link.

This, though — it looks like the domain is parked. Like the site doesn’t exist at all. That’s not good.

I emailed customer support, and got this in reply:

Dear Customer,

Thank you for contacting us. 

The error pages that you see on that page is the 1and1 generic error
pages, that's the reason why we give an option to our customers to let
them customize error pages. If you are not satisfied with the error
pages appearing on your site then I would suggets you create custom
error pages.

Anyone else with 1&1-hosted sites, have you tried it out? They say it’s normal, but then again, this is first-level support who rarely read the question before responding (no, I didn’t choose 1&1 for their customer support quality).

Either way, it’s another reminder of the importance of custom 404 pages. This just pushes it from “a good idea” to “essential” if you’re having the same issue. Fortunately, custom error pages are very easy to set up. From the 1&1 FAQ (check with your own host for variations): How to create custom Error Pages

Personally, I have 15 domains hosted in this account (various and sundry non-commercial mini-projects, including this blog), so I wanted a quick solution that I could use for all of them — certainly not creating carefully-themed custom error pages for each domain with site maps, etc., since none of these are high-profile by any stretch of the imagination. And I stuck with the simplest configuration: putting a file called error404.html at the web content root (htdocs, or whatever you chose to call it on your server), so that also means HTML only. No problem — K.I.S.S., right?

First, here’s the standard 404 page — pretty damned unhelpful, particularly to non-technical people:

Not Found

The requested URL /badlink.html was not found on this server.


Apache/2.2.3 (CentOS) Server at www.example.com Port 80

So I figured I have to at least do better than that. Admittedly, it’s a low bar to clear, but I used some basic JavaScript in a plain HTML page and came up with output that will look like this (if Javascript isn’t enabled, they’ll get a similar result with fewer details):

Page Not Found


Sorry! The address you followed (or typed into your address bar) doesn’t match up with any pages on this website.
http://www.example.com/badlink.html

Here are a few things you can try:

  • Is there a misspelling in the address? Edit it (in your browser’s address bar) and hit “Enter” to try again.
  • Did you come here from another website? Maybe they mistyped their link — you might be able to contact them about it. Hit your back button to return there.
  • Visit the homepage of this website: www.example.com

If you think there may be a problem with this website, you may wish to email the webmaster:
webmaster@example.com

That’s better, right? Because people don’t care that a “URL” wasn’t found on the “server” (if they even know what the jargon means). They just know they clicked a link (or typed it in from a scribbled note from a friend, etc.) and they see this instead of what they wanted. They only want to know how to fix it.

If you want to borrow this, right-click here and save the page as error404.html. It will work on any server, any domain name, etc. (since it figures out where you are based on the current URL) — you should just double-check that webmaster@example.com is a valid address.

If you use 1&1 webhosting, just upload this file to your web documents directory and you’ll be all set.

[Note to the more technical folks: you may wince to see the JavaScript code... I'm trying to support as many browsers & configurations as possible, so I'm minimizing the JS built-in methods I use, including ones that were later add-ons, or buggy somewhere along the way -- which includes regex! Tweaks are welcome, though; just keep these limitations in mind.]

Update: I’ve traded a few emails with customer support (they insisted there was an error page even if it did include ads…) and I’ve done more research (I realized that being in France might affect the view, so I tested the results using lynx on a server on the US).  Here’s what’s going on:

It looks like they have a default 404 error page which displays ads as well, but at least includes the words “Your browser cannot find the document corresponding to the URL you typed in.”…  but it only works correctly for visitors within the US.

If you hit the same link from anywhere else, whatever handling sedoparking.com is doing for different languages, etc. breaks the error display.

And (the bad news for anyone else hosting with 1&1) since it’s a problem with sedoparking.com, it’s not something 1&1 screwed up on my server — this will affect the foreign visitors of anyone using 1&1 shared hosting.

If they fix it, I’ll update here again.


Comments

  1. Quote

    Hiya,
    I think Sedo got this all fixed up.

    Ciao.

  2. Quote

    I think Sedo got this all fixed up.

    I tested again — it’s still broken. They must be using IP records to choose locale (since the HTTP headers I’m sending them only show that my computer is localized to the US; I’m just physically in France), then they are showing any 404 as if it were a parked domain.

    I think they screwed up when set up the 1&1 404 page setup for non-US locales (or at least non-English locales). Or maybe they just didn’t bother?

    Notes on testing this:
    1) You need a domain on 1&1 shared hosting with no custom 404 page. http://tellmelater.com isn’t active yet, so you can use it for testing. (I’m leaving it broken….)
    2) Access a non-existent page (like http://tellmelater.com/notfound.html) on that domain from a computer in a non-English speaking country.

    If anyone tests from within Canada or the UK, let me know if it’s broken there as well (and you see a page like for a parked domain)… I’m not sure if this is broken for ALL non-US access, or just access from non-English-speaking countries.

  3. Quote

    Is there any way to turn the 404 error messages into a rss feed?

  4. Quote

    Edit .htaccess
    Insert

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Wait a few seconds and your wordpress 404 error page should work

  5. Quote

    @iRipoff: I’m not sure what you’re looking for. Why would you want an RSS feed of 404s?

    @arthur: I’m not writing about wordpress 404 issues — this post is strictly about a problem with 1&1’s default 404 pages.

  6. Quote

    You may want to unlink “the-domain-name.com” or use example.com. That domain is “parked” with ads and is no different than linking to Sedoparking.com

  7. Quote

    @Stephen — thanks, I overlooked that… absolutely, no need to feed another one. I’ve switched the examples over to example.com (note to other readers: “example.com” is reserved for exactly this use and isn’t available as a real domain), plus added a rel=”nofollow” to the 1&1 FAQ page link, since it’s not much use to non 1&1 customers either, and 1&1 certainly isn’t paying me to advertise them.

  8. Quote

    Thanks so much - a really useful post!

Leave a Comment

(required)

(required)

Formatting Your Comment

The following XHTML tags are available for use:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

URLs are automatically converted to hyperlinks.

Close
Powered by ShareThis (custom mod)