A 404 ("file not found") error occurs when a visitor to your website tries to access a page that does not exist. If your site is hosted on web.mit.edu, you can customize the look and feel of this error message to fit with the rest of your website.
Providing a custom 404 page that includes your identity, main navigation links to your site, and a search box will help visitors find what they are looking for.
I'm sorry /web/reference/web-resources/404.shtml cannot be found. It may have been removed, had its name changed, or is temporarily unavailable.
- If you typed the URL, check the spelling
- Start from the [your site here] home page and look for links to the information you want.
- Click the back button and try another link. Please report the bad link to the page owner of the previous page.
- Search our website using the form below. Search [your site here]
If you still can't find the document you're looking for please contact [your department name]. HTTP 404 - file not found
Select the code below, copy it into a new page using your favorite text or HTML editor. Customize the website name, links, and contact information. Save the page as 404.shtml in a folder named "errors" in the root of your website.
You can also use an HTML page, but you won't be able to display the URL that the visitor was trying to find.
Important: All image and link paths need to be absolute (e.g., /web/reference rather than ../reference). If the paths are not absolute the error page will not display or link correctly.
When the server can't find the URL requested it looks for a .htaccess.mit file located in the root of your website. This text file should include the following line: ErrorDocument 404 /afs/athena.mit.edu/your_websites_path/errors/404.shtml
This file tells the web server that you have a custom 404 page. This is the same file that restricts access to web pages via MIT certificates. Both of these instructions can co-exist in the same file.
Make a directory at the root of your website called "errors". Name your custom 404 error page "404.shtml" and upload it to the errors folder. Upload the .htaccess.mit to the root of your website or the directory for which you would like the custom 404 error page to be displayed.
After you've uploaded these two documents to your site, remember to test it. Go to nonexistent pages in all the directories of your website.