{"id":1962,"date":"2021-09-17T05:34:49","date_gmt":"2021-09-17T05:34:49","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=1962"},"modified":"2021-09-17T05:39:55","modified_gmt":"2021-09-17T05:39:55","slug":"how-to-create-a-custom-404-page-in-joomla","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/","title":{"rendered":"How to Create a Custom 404 Page in Joomla?"},"content":{"rendered":"<p>The page not found error is downright irritating and it might bug away visitors and that they could never return to your web site. To scale back the difficulty cause by a 404 error you&#8217;ll use a custom 404 error page rather than the boring and useless one. The page might give the required details to guide the lost visitor and ensure they return to your website.<\/p>\n<p>Before you create your own custom 404 page check the subsequent things that you must have on a 404 page.<\/p>\n<p><strong>Search Box<\/strong>\u2013 If there&#8217;s search option on your web site then you must add it to the 404 page further so the visitor will search what they&#8217;re trying to find on your site.<\/p>\n<p><strong>Sitemap link<\/strong>\u2013 it&#8217;s essential that you simply have link to your sitemap and your homepage therefore the visitors will notice the way to go back to the site and find what they need.<\/p>\n<p>Follow these straightforward steps for designing your custom 404 error page in Joomla! 2.5.<br \/>\n<strong>Step 1:<\/strong>\u00a0You need to create a file and name it error.php and place the file into the main directory of your template that is (\/templates\/your_template\/error.php). Then you have to add the code to the file as give below:<\/p>\n<p><code>&lt;?php<\/code><\/p>\n<p>\/\/ no direct access<\/p>\n<p>defined( \u2018_JEXEC\u2019 ) or die( \u2018Restricted access\u2019 );if ($this-&gt;error-&gt;getCode()==404) {<\/p>\n<p>echo file_get_contents(\u2018http:\/\/www.example.com\/error\u2019);<\/p>\n<p>exit();<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p>Make sure that you replace the URL with your web site.<\/p>\n<p><strong>Step 2:<\/strong> Now create a message for the page with the title error or 404 or anything that you simply feel would work. you must place in a category that isn&#8217;t directly visible on your website.<\/p>\n<p>You might have seen error or 404 messages on websites like Reddit or Twitter that are quite inventive and you&#8217;ll additionally create one thing on those lines to redirect your visitor to a relevant page on your site.<\/p>\n<p><strong>Step 3:<\/strong> Then make a menu hidden menu, one that isn&#8217;t published and create an item with the name \u2018error\u2019 with an alias of error. If you wish to use another alias then you would required to change the above URL to reflect the same.<\/p>\n<p>Now give the type \u2018Single Article\u2019 to it and point it to your \u2018Error\u2019 article.<\/p>\n<p>It\u2019s all completed. Now whenever you&#8217;ve got a broken link or there&#8217;s a wrong link used by a visitor then they might see your custom error page with a catchy message that may redirect them to a correct page rather than the crappy server error that sometimes bugs visitors off.<\/p>\n<p>If you&#8217;ve got the other problems after you build a web site or associated with web site hosting then you can refer our WebHosting Blog or post your question in our live chat support and that we would do our greatest to assist you get your website fixed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The page not found error is downright irritating and it might bug away visitors and that they could never return to your web site. To scale back the difficulty cause by a 404 error you&#8217;ll use a custom 404 error page rather than the boring and useless one. The page might give the required details [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1962","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a Custom 404 Page in Joomla? - OWS KB<\/title>\n<meta name=\"description\" content=\"To scale back the difficulty cause by a 404 error you&#039;ll use a custom 404 error page rather than the boring and useless one.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Custom 404 Page in Joomla? - OWS KB\" \/>\n<meta property=\"og:description\" content=\"To scale back the difficulty cause by a 404 error you&#039;ll use a custom 404 error page rather than the boring and useless one.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-17T05:34:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-17T05:39:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/\",\"name\":\"How to Create a Custom 404 Page in Joomla? - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-09-17T05:34:49+00:00\",\"dateModified\":\"2021-09-17T05:39:55+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"description\":\"To scale back the difficulty cause by a 404 error you'll use a custom 404 error page rather than the boring and useless one.\",\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-create-a-custom-404-page-in-joomla\/\",\"name\":\"How to Create a Custom 404 Page in Joomla?\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=1962"}],"version-history":[{"count":2,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1962\/revisions"}],"predecessor-version":[{"id":1964,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1962\/revisions\/1964"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=1962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=1962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=1962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}