Last updated on March 9th, 2023 at 06:59 pm
Does your website presents “Error 404 – Page not found” messages to your users?
Arquivo.pt offers a solution for this problem through arquivo404.
Just insert a single line of code in the page that generates the 404 error message on your website and web-archived pages will be presented to your users instead of pages not found.
See these examples on websites that installed arquivo404.
How Arquivo404 works
When a page is no longer on a website, Arquivo404 checks if a preserved version exists.
When a user tries to access a page that is no longer available on a website, arquivo404 automatically checks if there is a version of that page preserved in Arquivo.pt.
If the page exists in Arquivo.pt, a link is presented so that the user may visit this version. If it does not exist, the normal error page is displayed.
See Arquivo404 at work in this example of an error page that presents a link automatically generated by arquivo404.
How to install arquivo404 on your website?
The simplest implementation of arquivo404 is to insert the following Javascript on the HTML code that generates the “Page not found” message:
<script type="text/javascript" src="https://arquivo.pt/arquivo404.js" async defer onload="ARQUIVO_NOT_FOUND_404.call();"></script>
The code in arquivo404 can easily be adapted. You can for example create a customised error message.
If you have any questions or issues, please contact us!
To know more
- Examples of arquivo404 in action
- Arquivo404 code on GitHub
- Video arquivo404
- Video tutorial for non experts (in Portuguese)
Short link to this page: arquivo.pt/arquivo404en