Add Wayback Machine Archive Links to 404 Error Pages

By 15-12-2014   BloggingSEOWordPress

Would it not be nice if you could have links on 404 Error pages pointing to Wayback machine Archive.org links on how the pages looked like in the past. Of course there can be no better way for doing this than adding a single line of code which will check the 404 link for  an archived url.

The Wayback machine (Archive.org) archives all your websites at different time periods and has true snapshots of your webpages. It is the best way to find how webpages looked like in the past. When your links go awry, and you are not able to fix all of them, why not point visitors to links of how the page actually looked like in the past.

Add Archive.org Links

They suggest you simply add the following code in your 404 page template. In WordPress, you can add in the 404.php file while editing your theme template.

<div id="wb404"/>
<script src="https://archive.org/web/wb404.js"> </script>

Now when a visitor visits a page which has been indexed in the Wayback machine, it will display the link to the latest copy they stored. See how it looks on our 404 pages right now.

wayback archive links

Note:  If it is a random url, and the script cannot find the link, then it will display a blank space and stay out of the way, which is good.

When not to do this? If you add this to your 404 page template, the code will display on all 404 pages which have a Archived link. You would not like to implement this feature if you have purposefully deleted the urls and force 404 errors, to fix Google penalties or maybe the page is actually gone and you want to display a 410 gone error purposefully.

 

13 comments on “Add Wayback Machine Archive Links to 404 Error Pages

  1. Richard says:

    Happy New Year, I will be looking forward to another year of terrific posts.

  2. Lamia khan says:

    Thanks For guide
    it is very useful In 404 error page
    Nice sharing
    Keep up it

  3. Sachin says:

    Hii Chandra
    i solve my site 404 problem with awesome article
    Thanks sharing for help
    Have good day

  4. James says:

    I personally don’t see any reason to bother to fix it. After all past designs aren’t of any importance for anybody.

  5. john parkar says:

    Nice share and i solve my websites 404 problem.
    Thanks for this article

  6. Suresh Prasad says:

    Oh! It’s great info. It may help those users having old/deleted post URL. Recently, I created a custom 404 errors page for blogger blog users but I Wayback Machine has not come to my mind.

    Thanks for this story. Today, I learned something new from your site.

  7. موقع الصور says:

    I personally don’t see any reason to bother to fix it. After all past designs aren’t of any importance for anybody.

  8. semavideo says:

    Honestly I have not thought much of this. On the contrary, I honestly did not even know. Text Archive Links to 404 Error Pages has really helped me to get to know this subject, and I think that will help me in the work that I do. Thanks a lot, and regards

  9. jessica thompson says:

    I really like your website.I have made bookmarked of your website to visit again n again.http://spa-66.com

  10. rasel says:

    Nice share and i solve my websites 404 problem.
    Thanks for this article

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php