Announcement

Collapse
No announcement yet.

Custom Error Documents

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Error Documents

    How to use the Plesk Custom Error Documents

    Introduction


    When a web site cannot satisfy the request made of it, it will, if possible, serve an error document. Everyone will be familiar with the infamous ‘404 Not Found’ seen when the page you have requested can no longer be located on the web site, usually because it has been moved or removed completely.

    It is possible to replace the standard error documents with your own custom versions. Your custom error documents could maintain the theme of your web site, provide some friendly information, and redirect the browser to your index page or maybe your search page. In short they can maintain a friendly link with the person browsing rather than indicate that something has gone wrong.

    There is a potential problem however. Some modern browsers and various plug ins (such as anti-virus and anti malware) will try to show their own error pages, this is their attempt to make the browsing experience better but may negate your work to produce a custom document.

    Getting Started

    Firstly you need to have Custom Error Documents enabled on your hosted domain, by default they should be but if you have reason to think not please call our support department and we will enable them.

    The following are the available template default error documents, seen here in the Plesk file manager. The documents are located in the ‘error_docs’ folder off the web root

    You can modify or replace any of these documents but be sure to preserve the same file permissions or you will have problems.

    The Default 404 (file not found error)

    The default 404 not_found.html looks like this, note that the document we are trying to find is called bah.html and does not exist on the server.



    Customising

    You have a few options now, you can use Plesk’s basic file editing features to edit the documents that are already provided. You can create a document in your favourite HTML editor then upload it via FTP (or via Plesk’s basic facility to add a file, but you will have to rename or remove the existing file first). You could create a page in your SellerDeck software, carrying the same theme and your brand and upload that.

    For this example we will use Plesk’s built in editor to change the not_found.,html page

    Editing with Plesk

    This is what the document looks like by default, note the comment about the document size.



    We are only making a very simple change to our document, just to illustrate the process.



    Edit the document and save it then click Ok to end the editing session. Now try it in your browser and you should see the new page.

    Attached Files
Working...
X