Make a More Functional 404 Error Page

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Marincky
    General

    • Apr 2006
    • 4539

    Make a More Functional 404 Error Page

    There may be other ways of doing this, this may have already been discussed, but for those of you out there who are interested in my way here is a great way to make a far more impressive and practical 404 error page.

    When someone types an error on your domain address or maybe clicks on a redundant link that is still on the seacrh engine, they usually get taken to a very informal blank white page that says something like:

    404 Error. The requested page cannot be found.

    Pretty useless for your potential visitors as they will now bugger off elsewhere!

    Here however, is what happens when they click on one of my client's sites on a url that doesn't exist...


    (click to see what happens)

    This is a much better page for your client to land on than the usual 404 error page.

    How to make:

    Create your own 404 page by using one of your site pages as the template. In my example above, the error page is basically an exact duplicate of the home page. I have just ammended the top lines to read as it does. You can create a page as you like though.

    I named this page custom_page but again, name it what you like and publish it.

    Go into your CP and then File Manager.

    Look for a file called .htaccess

    Open this file up to edit.

    If it is blank just add this exactly as it is below and on one line.

    ErrorDocument 404 /custom_page.html


    It's also a good idea to add the code <meta name="robots" content="noindex"> to the <head> section of your 404 page, so that search engine robots don't add it to their indexes.

    (If you named your page anything else but custom_page then just change that in the link above)

    save it.

    Now see if it works....
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.
  • Marincky
    General

    • Apr 2006
    • 4539

    #2
    Re: Make a More Functional 404 Error Page

    I forgot to add....

    My client above received 845 error page hits in the last 4 days. Visitors coming across standard erro pages are fairly likely to go to another site... Need I say more?
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

    Comment

    • judavvforum
      Major

      • Nov 2007
      • 384

      #3
      Re: Make a More Functional 404 Error Page

      Thanks for that bit of wisdom, Ramsey! It really does make more sense! I didn't even know that we had control of that page!

      It's a good day when you can learn something new!

      Cheers!

      Comment

      • sedona
        Major General

        • Jun 2007
        • 2177

        #4
        Re: Make a More Functional 404 Error Page

        Thanks for that, Ramsey. Very easy and a valuable addition to any site. When I come across custom 404s where I can navigate back into the site I usually do so, as you say.
        CarbonTerry did a tutorial on this subject a while back and I meant to get back to it but didn't. Will be building one today.
        Cheers!
        Ken

        If there hadn't been women we'd still be squatting in a cave eating raw meat, because we made civilization in order to impress our girl friends. And they tolerated it and let us go ahead and play with our toys. Orson Wells

        Comment

        • Marincky
          General

          • Apr 2006
          • 4539

          #5
          Re: Make a More Functional 404 Error Page

          Originally posted by sedona View Post
          Thanks for that, Ramsey. Very easy and a valuable addition to any site. When I come across custom 404s where I can navigate back into the site I usually do so, as you say.
          CarbonTerry did a tutorial on this subject a while back and I meant to get back to it but didn't. Will be building one today.
          Cheers!
          Yeah as I said I wasn't sure if someone had touched on this before, but no doubt there are loads of ways, this is just one I discovered that I feel looks good.
          Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

          Comment

          • Tom vR
            Brigadier General

            • Apr 2007
            • 1731

            #6
            Re: Make a More Functional 404 Error Page

            Thanks Ramsey for a great post.
            Bless you
            Tom

            Comment

            • choco777
              Brigadier General

              • Apr 2006
              • 1526

              #7
              Re: Make a More Functional 404 Error Page

              Nothing in file mgr saying htacess
              Choco777
              www.mayatabasco.com


              Comment

              • Marincky
                General

                • Apr 2006
                • 4539

                #8
                Re: Make a More Functional 404 Error Page

                Originally posted by choco777 View Post
                Nothing in file mgr saying htacess
                hmmm, I just noticed on the new control panels this file does not show in the file manager, despite being able to see it through ftp manager. You can always create a new file with notepad and call it .htaccess. Then just enter the code I showed above.
                Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

                Comment

                • Marincky
                  General

                  • Apr 2006
                  • 4539

                  #9
                  Re: Make a More Functional 404 Error Page

                  Originally posted by choco777 View Post
                  Nothing in file mgr saying htacess
                  Click on file legacy manager.
                  Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

                  Comment

                  • Marincky
                    General

                    • Apr 2006
                    • 4539

                    #10
                    Re: Make a More Functional 404 Error Page

                    Just two little updates to this:

                    1) If you have more than one domain on an account, this can still be done. Just make a custom 404 page for all sites, make sure they are all named the same and publish them all to their respective domains.

                    2) Since doing this on all my own sites my Google Adsense revenue has increased by about 25%.
                    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

                    Comment

                    • DarrenC
                      Brigadier General

                      • Jul 2008
                      • 1750

                      #11
                      Re: Make a More Functional 404 Error Page

                      Originally posted by Marincky View Post
                      Click on file legacy manager.
                      Sorry Ramsey I can't find it in here either, is it under a different name or in a folder somewhere?

                      Darren
                      Happy Building

                      DarrenC

                      Comment

                      • DarrenC
                        Brigadier General

                        • Jul 2008
                        • 1750

                        #12
                        Re: Make a More Functional 404 Error Page

                        Scratch that.. I found it.
                        Happy Building

                        DarrenC

                        Comment

                        • Marincky
                          General

                          • Apr 2006
                          • 4539

                          #13
                          Re: Make a More Functional 404 Error Page

                          LOL, I have a feeling in the new CPs you have to tick 'show hidden files' or something like that
                          Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

                          Comment

                          • DarrenC
                            Brigadier General

                            • Jul 2008
                            • 1750

                            #14
                            Re: Make a More Functional 404 Error Page

                            Apparently it says I don't have permision to tinker with htaccess on my server, when I clicked on the url at the bottom of this image. I am not sure which one to click on because it looks different the illustration above.



                            Please advise

                            Thanks
                            Happy Building

                            DarrenC

                            Comment

                            • Marincky
                              General

                              • Apr 2006
                              • 4539

                              #15
                              Re: Make a More Functional 404 Error Page

                              If I remember correctly I did just 'edit file'
                              Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

                              Comment

                              Working...
                              X