UK Sales: 0800 035 6364 | | We'll Call You

Redirecting Error Pages

This page describes how to customise the error messages that appear when someone follows a link to a page that does not exist, as well as other common errors. By dropping a file called .htaccess in the root directory as shown in the example, every time one of these error pages is called, a page of your creation will be shown instead.


AuthName 2020MEDIA
AuthType Basic
errordocument 404 /errors/err404.html
errordocument 500 /errors/err500.html

And so on for other pages. Click here for a full list of error pages. In the example above, the error pages would be found in a directory called 'errors', but it is up to you to call them whatever you want.
The .htaccess file is a plain text file, without any extension like .txt or .doc. It must be uploaded as ASCI - this is the default for most FTP programmes. Upload the file into the root directory ( also called the 'home' directory) and then attempt to view a page you know doesn't exist. You should get the page you created instead of the usual 'HTTP 404 Page does not exist' page. Once on the server its likely you won't be able to see the .htaccess file as it is a hidden file. You could rename the .htaccess.txt for editing purposes and then back to just .htaccess to enable them.

If you have read the page about password protecting pages, don't include the bit about AuthUserFile as it will password protect your entire website! Also, don't redirect 401 errors - this is used for password protecting of directories.

For further information consult any of the many books on Apache Web server, or see


Final Tip:
See also Password Protecting Pages for more on htaccess.

1 You can redirect any http code.
2 Links can be relative or absolute.
3 The AuthName must not include spaces. I.e "2020 Media" is not allowed.
4 The .htaccess file should be placed in the highest level direcory and it's
action will affect all lower directories unless there is another .htacess file to override them.
5 The file must be in unix text format. Dos text will not work. Be sure to
upload using ASCI mode in your ftp client.

2020Media is a leading provider of small business Wi-Fi hotspots. If you want to offer free Wi-Fi to your customers or users, our service could be exactly what you are looking for. Our Hotspots are managed in the cloud, ultra-reliable and give you loads of information about behaviour patterns of your users. Read More   Read more...
2020Media introduces Moodle Hosting - UK servers and UK Moodle experts setup your site ready to use. Read more...
Special Offer for Longer Registration Periods Register or renew a .com, .net or .org domain name for 5 years we'll include 1 year free*. Read more...
2020Media is now offering zero-click installation of the popular TYPO3 content management system. Read more...

Our blog is regularly updated with news, tips and industry opinion.


  • AggieWestons
  • baker-and-mckenzie
  • arts-council-england
  • Big Finish
  • barratt-developments-logo
  • City-of-Lincoln-council-logo
  • brora-logo
  • DenisMacShane
  • Construction-Industry-Council
  • colchester